Long story short I need to have some tables. I have several metasprite mappings, like this. The data in question is completely contrived, it's simplified for the example:
Now, I have another table, which is a list of pointers to my mappings. All of this is in readonly, stored as absolute addresses.
mapping_table:
.addr mapping0
.addr mapping1
; so on and so forth
However, in every case, the entries in mapping_table are off by $10. I can move the tables around, change their order, and the problem remains. Has anyone else experienced a similar problem?
This file contains the tables in question. You can see the +$10 I did as a kludge. The code to read the tables isn't perfect yet (this many levels of indirection is a bit hard for an asm first timer) but I've been verifying this data using a hex editor rather than my code.
https://github.com/Mikejmoffitt/6502jam ... s/girl.asm
Code:
mapping0:
.byte $01, $22, $34, $45
.byte $56, $67, $AF, $11
mapping1:
.byte $22, $33, $44, $55,
.byte $55, $66, $77, $88
so on and so forth
.byte $01, $22, $34, $45
.byte $56, $67, $AF, $11
mapping1:
.byte $22, $33, $44, $55,
.byte $55, $66, $77, $88
so on and so forth
Now, I have another table, which is a list of pointers to my mappings. All of this is in readonly, stored as absolute addresses.
Code:
mapping_table:
.addr mapping0
.addr mapping1
; so on and so forth
However, in every case, the entries in mapping_table are off by $10. I can move the tables around, change their order, and the problem remains. Has anyone else experienced a similar problem?
Code:
.addr A
produces identical code to Code:
.byte <A, >A
, by the way. That I am pretty sure of, as it looks that way from inspection with a hex editor.This file contains the tables in question. You can see the +$10 I did as a kludge. The code to read the tables isn't perfect yet (this many levels of indirection is a bit hard for an asm first timer) but I've been verifying this data using a hex editor rather than my code.
https://github.com/Mikejmoffitt/6502jam ... s/girl.asm