11 March 2016 - Forum Rules
Started by redmagejoe, December 10, 2019, 03:09:14 AM
L3AB75: AB75 LDA $82 ; get spell ID AB77 CMP #$D0 ; see if it is WARP AB79 BNE L3AB9A ; if not, branch elsewhere AB7B LDA $2D ; AB7D LSR A ; shift lowest bit into carry AB7E BCC L3AB70 ; if carry clear, branch elsewhere AB80 LDA $19 ; AB82 BEQ L3ABDB ; if $19 = $0, branch elsewhere AB84 LDA #$47 ; message ID AB86 JSR F3ADB6 ; draw message window with "can't warp" AB89 JSR F3ADE9 AB8C JSR F3EE60 AB8F LDX #$0B AB91 JSR F3B486 AB94 LDA #$01 AB96 STA $A2 AB98 CLC AB99 RTS
Quote from: redmagejoe on June 15, 2020, 06:16:46 PM@Jiggers: I'm assuming that code chunk is more or less identical to Teleport's. I'll see if I can't make sense of that. If I could make an index of what IDs translate to what maps, it would be easier for me to give you useful info, but I'll see what I can do! I'm at a point where I can't return to Palamecia Castle in my current file, so I should probably consider starting a new one.
L3ABAF: ABAF CMP #$E6 ; see if the spell is EXIT ABB1 BNE L3AB70 ABB3 LDA $2D ABB5 LSR A ABB6 BCC L3AB70 ABB8 LDA $19 ; if $19 is not $0... ABBA BNE $AB84 ; branch to the "can't warp" part of WARP's code block
Quote from: redmagejoe on June 13, 2020, 12:54:18 PMI'll have to make a note to mention that on the hack page, now that load order matters.
Quote from: Jiggers on June 13, 2020, 05:42:02 PMOopsie on the shifting... Thanks for catching it though.
Quote from: Jiggers on June 13, 2020, 05:42:02 PMAccording to this, map $2F doesn't appear in the game? But the disassembly still has it as being loaded at some point. Map $0E wins the award for showing up #20 times in the LUT!
Quote from: Jiggers on June 15, 2020, 04:25:04 PMYeah, this is just for metatiles. Still have to find exactly how many of those are in the game's data, then find out what graphic tiles they represent. But this doesn't contain any teleport coordinates or anything... so kind of useless if there's no bugs in the map layouts.
Quote from: redmagejoe on June 15, 2020, 05:10:43 PMThe entirety of Palamecia Castle, once entered, is supposed to prevent the player from escaping via Teleport or Warp, as is handled in many other places in the game "An energy field prevents you from warping out". This includes, apparently, most of 7F of the castle. However, there's an area in the center of 7F, which is accessed via a different set of stairs such that it's one floor but with two separate "areas" divided by walls, where it's completely possible to teleport out. I'm hard pressed to believe this was intentional, but I'd also think that it would be the entire floor that has a "no teleport" flag set.
L3CAFF: CAFF CMP #$C0 CB01 BNE F3CB20 CB03 JSR F3D8EE CB06 LDA #$00 CB08 JSR F3FE03 CB0B LDX $45 ; = $0 when leaving first town, $1 when leaving dreadnaught town CB0D LDA $B4C0,X ; get X or Y coordinate from this table CB10 SEC CB11 SBC #$07 ; subtract 7 to get player position CB13 STA $27 ; save position CB15 LDA $B4E0,X ; get X or Y coordinate from second table CB18 SEC CB19 SBC #$07 ; subtract 7 to get player position CB1B STA $28 ; save position CB1D JMP L3C0B8
Quote from: redmagejoe on June 16, 2020, 02:26:22 AMOut of curiosity, abw, are status effects applied by player weapons, or enemy physical attacks, affected by Magic Resist on the target?
Quote from: redmagejoe on June 16, 2020, 02:26:22 AMIf he is correct, this means that Shell is by and far the most powerful endgame of the triad of Wall, Shell, Barrier, though Barrier arguably has more versatility at lower levels.
Quote from: redmagejoe on June 17, 2020, 12:30:37 PMI suppose it's not surprising to those more versed in NES programming than I, but $48 is repurposed during combat, it seems, reverting to its previous value (held in some other address I'm sure) until the end of combat.
Quote from: Jiggers on June 17, 2020, 08:07:57 PMWhich brings a new mystery: What is $67?
QuotePreemptive Strike notification comes after commands are issued. Enemy commands are issued, but should no longer give counter credit due to other fixes. Move Preemptive message to beginning of battle.
; data -> code; control flow target (from $909C); call to code in a different bank ($0F:$FD46)0x032318|$0C:$A308:20 46 FD JSR $FD46 ; wait for sprite 0 clear, then write $3B to PPU Control Register #1 and $39/$37 to VRAM Address Register #10x03231B|$0C:$A30B:AD 4A 7B LDA $7B4A ; surprise battle indicator (0 = normal, 1 = monsters surprised party, 2 = party surprised monsters)0x03231E|$0C:$A30E:F0 42 BEQ $A352 0x032320|$0C:$A310:20 90 94 JSR $9490 ; write #$FF (space) to CHR buffer at $7600-$76FF0x032323|$0C:$A313:A2 09 LDX #$09 ; Battle Message ID #$09: %u305B%u3093%u305B%u3044%u3053%u3046%u3052%u304D%u306E %u30C1%u30E3%u30F3%u30B9%uFF01%uFF01 (Preemptive Strike)0x032325|$0C:$A315:AC 4A 7B LDY $7B4A ; surprise battle indicator (0 = normal, 1 = monsters surprised party, 2 = party surprised monsters)0x032328|$0C:$A318:88 DEY 0x032329|$0C:$A319:D0 01 BNE $A31C 0x03232B|$0C:$A31B:E8 INX ; Battle Message ID #$0A: %u30E2%u30F3%u30B9%u30BF%u30FC%u306E %u305B%u3093%u305B%u3044%u3053%u3046%u3052%u304D%uFF01 (Ambushed!); control flow target (from $A319)0x03232C|$0C:$A31C:86 64 STX $64 0x03232E|$0C:$A31E:A9 B2 LDA #$B2 ; $05:$B295; battle message pointers0x032330|$0C:$A320:85 63 STA $63 0x032332|$0C:$A322:A9 95 LDA #$95 ; $05:$B295; battle message pointers0x032334|$0C:$A324:85 62 STA $62 0x032336|$0C:$A326:20 AB 9A JSR $9AAB ; swap in PRG bank #$05, then given a pointer index in $64, copy bytes from the $64'th pointer in the pointer table at $62-$63 to $7D47,X=$AA until we read a 0 or X reaches #$11; save X to $7CBF0x032339|$0C:$A329:A9 10 LDA #$10 0x03233B|$0C:$A32B:85 44 STA $44 0x03233D|$0C:$A32D:85 45 STA $45 0x03233F|$0C:$A32F:A9 00 LDA #$00 0x032341|$0C:$A331:85 6F STA $6F 0x032343|$0C:$A333:20 E7 95 JSR $95E7 ; given line length (interior window width) in $45, write string buffer $7D47 to $44 in the $6F'th page of $A8-$A9 (a.k.a. $7600,$44); call to code in a different bank ($0F:$FD5B)0x032346|$0C:$A336:20 5B FD JSR $FD5B ; wait for sprite 0 hit, then write $3A & #$EF to PPU Control Register #1, $38 to VRAM Address Register #1, then call $05:$BA00, $0D:$9800, and then swap in bank stored in $3E0x032349|$0C:$A339:A9 04 LDA #$04 0x03234B|$0C:$A33B:85 64 STA $64 ; call to code in a different bank ($0F:$FB42)0x03234D|$0C:$A33D:20 42 FB JSR $FB42 ; call $05:$AA570x032350|$0C:$A340:A0 20 LDY #$20 0x032352|$0C:$A342:20 9B 94 JSR $949B ; wait for Y vblanks; call to code in a different bank ($0F:$FD46)0x032355|$0C:$A345:20 46 FD JSR $FD46 ; wait for sprite 0 clear, then write $3B to PPU Control Register #1 and $39/$37 to VRAM Address Register #10x032358|$0C:$A348:A9 04 LDA #$04 0x03235A|$0C:$A34A:85 64 STA $64 ; call to code in a different bank ($0F:$FB46)0x03235C|$0C:$A34C:20 46 FB JSR $FB46 ; call $05:$AB4F; call to code in a different bank ($0F:$FD46)0x03235F|$0C:$A34F:20 46 FD JSR $FD46 ; wait for sprite 0 clear, then write $3B to PPU Control Register #1 and $39/$37 to VRAM Address Register #1; control flow target (from $A30E)0x032362|$0C:$A352:20 8A A6 JSR $A68A ; determine turn order for the current round; call to code in a different bank ($0F:$FD5B)0x032365|$0C:$A355:20 5B FD JSR $FD5B ; wait for sprite 0 hit, then write $3A & #$EF to PPU Control Register #1, $38 to VRAM Address Register #1, then call $05:$BA00, $0D:$9800, and then swap in bank stored in $3E0x032368|$0C:$A358:20 41 A7 JSR $A741 ; execute a complete round of combat0x03236B|$0C:$A35B:4C 5E 90 JMP $905E
Quote from: redmagejoe on June 17, 2020, 08:10:58 PMSo below appears to be the relevant code for the above, which I haven't sat down and examined yet, [...]
Quote from: redmagejoe on June 19, 2020, 02:17:48 PMIt looks good! I definitely don't see any reason for the interface to jerk around just to display the message before returning to its previous position. Definitely far better behavior than vanilla.
Quote from: redmagejoe on June 19, 2020, 02:17:48 PMAnd I don't see any reason not to include the change in Bug Fix. It would be the only entry in the series where it behaves the way it does in vanilla, and it seems more like an oversight than intentional design. I say we push it into Bug Fix when it's all tested.
Page created in 0.050 seconds with 19 queries.