It's a warp. It's a part of the level layout, and only appears in the first room, as a block with ID of 4. The game explicitly checks if you're touching it, and if you do, it sends you directly to the last room.
Language: asm6502
collision:
A:04 X:00 Y:00 S:F9 P:nvUbdIzc $1F:E5AF: 48 PHA
A:04 X:00 Y:00 S:F8 P:nvUbdIzc $1F:E5B0: A5 D6 LDA $D6 = #$1C
A:1C X:00 Y:00 S:F8 P:nvUbdIzc $1F:E5B2: 85 D7 STA $D7 = #$1C
A:1C X:00 Y:00 S:F8 P:nvUbdIzc $1F:E5B4: A0 14 LDY #$14
A:1C X:00 Y:14 S:F8 P:nvUbdIzc $1F:E5B6: 20 19 C6 JSR $C619
A:1C X:00 Y:14 S:F6 P:nvUbdIzc $1F:C619: 84 D6 STY $D6 = #$1C
A:1C X:00 Y:14 S:F6 P:nvUbdIzc $1F:C61B: A5 D6 LDA $D6 = #$14
A:14 X:00 Y:14 S:F6 P:nvUbdIzc $1F:C61D: 29 1F AND #$1F
A:14 X:00 Y:14 S:F6 P:nvUbdIzc $1F:C61F: 05 DE ORA $DE = #$00
A:14 X:00 Y:14 S:F6 P:nvUbdIzc $1F:C621: 8D 00 C0 STA $C000 = #$78
A:14 X:00 Y:14 S:F6 P:nvUbdIzc $1F:C624: 60 RTS (from $C619) ----------------------------
A:14 X:00 Y:14 S:F8 P:nvUbdIzc $1F:E5B9: 8A TXA
A:00 X:00 Y:14 S:F8 P:nvUbdIZc $1F:E5BA: 8D 8F 06 STA $068F = #$00
A:00 X:00 Y:14 S:F8 P:nvUbdIZc $1F:E5BD: 68 PLA
A:04 X:00 Y:14 S:F9 P:nvUbdIzc $1F:E5BE: A8 TAY
A:04 X:00 Y:04 S:F9 P:nvUbdIzc $1F:E5BF: B9 64 82 LDA $8264 colPtrTableHigh,Y @ $8268 = #$D0
A:D0 X:00 Y:04 S:F9 P:NvUbdIzc $1F:E5C2: 85 4A STA $4A collision routine = #$B0
A:D0 X:00 Y:04 S:F9 P:NvUbdIzc $1F:E5C4: B9 74 82 LDA $8274 colPtrTableLow,Y @ $8278 = #$81
A:81 X:00 Y:04 S:F9 P:NvUbdIzc $1F:E5C7: 85 4B STA $4B = #$8B
A:81 X:00 Y:04 S:F9 P:NvUbdIzc $1F:E5C9: 20 CF E5 JSR $E5CF
Breakpoint 2 Hit at $E5CF: $E5CF:EC--X- Condition:K==#1F
A:81 X:00 Y:04 S:F7 P:NvUbdIzc $1F:E5CF: 6C 4A 00 JMP ($004A collision routine) = $81D0 warp
warp:
A:81 X:00 Y:04 S:F7 P:NvUbdIzc $14:81D0: E4 6A CPX $6A = #$00
A:81 X:00 Y:04 S:F7 P:nvUbdIZC $14:81D2: D0 2C BNE $8200 rts
A:81 X:00 Y:04 S:F7 P:nvUbdIZC $14:81D4: A9 C0 LDA #$C0
A:C0 X:00 Y:04 S:F7 P:NvUbdIzC $14:81D6: 09 01 ORA #$01
A:C1 X:00 Y:04 S:F7 P:NvUbdIzC $14:81D8: 09 40 ORA #$40
A:C1 X:00 Y:04 S:F7 P:NvUbdIzC $14:81DA: 8D 07 06 STA $0607 = #$00
A:C1 X:00 Y:04 S:F7 P:NvUbdIzC $14:81DD: A9 01 LDA #$01
A:01 X:00 Y:04 S:F7 P:nvUbdIzC $14:81DF: 8D 08 06 STA $0608 = #$01
A:01 X:00 Y:04 S:F7 P:nvUbdIzC $14:81E2: AD 95 06 LDA $0695 warp? = #$25
A:25 X:00 Y:04 S:F7 P:nvUbdIzC $14:81E5: 8D B9 06 STA $06B9 room1 = #$32
A:25 X:00 Y:04 S:F7 P:nvUbdIzC $14:81E8: 8D BA 06 STA $06BA room2 = #$32
Download KuboBG.luaLanguage: lua
while true do
-- local x = memory.readbyte(0x0420)
-- local y = memory.readbyte(0x0440)
-- gui.text(x,y,"O")
local base = 0x0320
for x=0,15 do
for y=0,12 do
local typ = memory.readbyte(base+y*16+x)
if typ ~= 0 then
local color
if typ == 1 then color = 0xffffffff end -- wall
if typ == 3 then color = 0xffff00ff end -- end trigger
if typ == 4 then color = 0xffff0000 end -- warp
if typ == 5 then color = 0xffff8800 end -- chest
gui.drawBox(x*16,y*16+24,x*16+15,y*16+24+15,color)
gui.pixelText(x*16+2,y*16+24+2,typ,color)
end
end
end
emu.frameadvance()
end