Sunday, May 16, 2010

Holy Crap! For Real?!

Yep! You heard it here! Click-and-set editing now works for every single map. This means we can now customize hacks to the fullest without a single worry of needing space (*Offer does not apply to interactions and warps. See inside for de... oops!). There are current 3 ASM scripts being written. I have basically kicked out compressed dungeon loading since the game originally did not support fully uncompressed dungeon data. Here's the 2 major scripts (The other one is a modification of an existing one to call one of the scripts).

ROM0:3EF8 D5 push de
ROM0:3EF9 E5 push hl
ROM0:3EFA C5 push bc
ROM0:3EFB 3E 54 ld a,54
ROM0:3EFD EA 22 22 ld (2222),a

ROM0:3F00 21 00 40 ld hl,4000
ROM0:3F03 FA 2D CC ld a,(cc2d)
ROM0:3F06 DF rst 18
ROM0:3F07 2A ldi a,(hl)
ROM0:3F08 66 ld h,(hl)
ROM0:3F09 6F ld l,a
ROM0:3F0A FA 30 CC ld a,(cc30)
ROM0:3F0D 06 00 ld b,00
ROM0:3F0F 4F ld c,a

ROM0:3F10 09 add hl,bc
ROM0:3F11 7E ld a,(hl)
ROM0:3F12 C1 pop bc
ROM0:3F13 E1 pop hl
ROM0:3F14 D1 pop de
ROM0:3F15 5F ld e,a
ROM0:3F16 AF xor a
ROM0:3F17 7C ld a,h
ROM0:3F18 E6 80 and a,80

ROM0:3F1A C8 ret z
ROM0:3F1B 7C ld a,h
ROM0:3F1C D6 40 sub a,40
ROM0:3F1E 67 ld h,a
ROM0:3F1F AF xor a


ROM0:3949 11 00 CF ld de,cf00
ROM0:394C 2A ldi a,(hl)
ROM0:394D 12 ld (de),a
ROM0:394E 1C inc e
ROM0:394F 7B ld a,e
ROM0:3950 FE FF cp a,ff
ROM0:3952 C8 ret z
ROM0:3953 C3 4C 39 jp 394c ;I'm aware this could have been jr, but space was not an issue and BGB doesn't assemble it the way I want it to


So nothing to particular interest, but I thought maybe someone would like to see it. Here's some proof of the dungeon editing:



As usual, thanks for reading and hope to see you tomorrow!

No comments:

Post a Comment