mrcook/jetpac-disassembly

Question about sprite graphics definitions

phillipeaton opened this issue · 2 comments

Hello Michael,

I found this in your reverse engineered code:

@label=gfx_jetman_fly_right1
b$7761 defb $00                             ; Header byte 
 $7762 defb $02,$18                         ; Width (tiles), Height (pixels)
 $7764 defb $10,$00,$20,$00,$d8,$00,$44,$00 ; Pixel data follows

and later on

; Jetman sprite for walking left #1.
@label=gfx_jetman_walk_left1
b$7971 defb $08
 $7972 defb $02,$18
 $7974 defb $00,$00,$00,$00,$07,$80,$03,$80

For this second gfx definition, I see the header byte is $08, but most of the other sprite definitions have it as $00.

Do you know what the header byte is used for?

Reason for asking: I'm disassembling the VIC-20 version of Jetpac and it also has $08 in some of the sprite definitions, but using a memory watch with the MAME debugger, it doesn't seem to be read anywhere in the code.

Thanks.

Update: I believe I can now see where this data is read, it's the sprite erase/redraw routine, my debugger was not setup correctly.

I just worked through it, it's not a header byte, it's used to manage sprite X axis screen wrap, at least it is on the VIC-20. All the VIC-20 sprites that have it set to non-zero are about to move to the next character column:

image
image