Here we are: first of all big thanks to JohanFr, it gives lots to study!
I've spent pretty much all day testing, and even if the "zero page" approach is theorically something i've read about, it still won't work, i need further investigations, when i'll be more confident I'll try to explain better my attempt if still won't succeed!
For what concerns the "syntactic sugar" of "KickAss"
, well after lots of try and error I made it work with following approach:
Code:
BasicUpstart2(main)
#import "screenConstants.asm"
#import "memoryMap.asm"
*=CHARSET_ADDRESS "Charset"
.import binary "test_big/testimura_CharMapBig - Chars.bin"
*=CHARSET_ATTRIB_ADDRESS "Charset Attrib"
.import binary "test_big/testimura_CharMapBig - CharAttribs_L1.bin"
*=HUD_ADDRESS "test_TITLE"
.import binary "test_big/testimura_CharMapBig - (8bpc, 40x12) Map.bin"
main:
jsr SCREEN_CLEAR
lda #%11011000 // enable MULTICOLOR - Bit #4: 1 = Multicolor mode on.
sta $d016
lda #%00011110
sta $d018
lda #BLUE
sta $d023 //extra color 2
lda #BLACK
sta $d022 //extra color 1
lda #RED
sta $d021 //BG color
ldx #00 // Initialize loop counter to 0
ldy #00 //#$192 // Initialize counter for adding $28 //192
jmp loop_start
exit:
rts
.var NUMBER_OF_CHARS = 480
loop_start:
.for (var i = 0; i < NUMBER_OF_CHARS; i++) {
lda HUD_ADDRESS + i // Load the "ith" char
sta $0400 + i // Screen RAM
tay // Transfer the number of B to the y-register
lda CHARSET_ATTRIB_ADDRESS,y
sta $d800 + i // Color RAM
}
jmp exit
Attention: when I've noticed that I would be able to overcome 255 limitation I've decided to use a much bigger charMap made of 40 columns x 12 rows, this explains 480 as char number
With this i got full control of each char printed on screen, but after going back to suggested approach, I'm start thinking that probably i'm not doing this in most efficient way, maybe considering nested loop Cols\Rows or better way to save iterations\logic...
More important than everything is that I feel now i'm in the right place to learn