after a while I've found time to study my beloved C64 asm, and I've done a setup with Kick Assembly chained with VSCode.
I've tried to study alone, but after I while i think i can declare myself completely stuck and as a newbie I've found this forum for help!
I've already made some sprite with the help of SpritePad, now i'm facing a new challenge: print a charmap!
So i've made a new charmap with CharpadPro, made by 40x8 chars, 320 in total.
I've put up this snippet to print it on screen:
Code: Select all
BasicUpstart2(main)
#import "screenConstants.asm"
#import "memoryMap.asm"
*=CHARSET_ADDRESS "Charset"
.import binary "test/FancyMap_CharMapFull - Chars.bin" //
*=CHARSET_ATTRIB_ADDRESS "Charset Attrib"
.import binary "test/FancyMap_CharMapFull - CharAttribs_L1.bin" //
*=HUD_ADDRESS "MAKA_TITLE"
.import binary "test/FancyMap_CharMapFull - (8bpc, 40x8) Map.bin" //
*=GAME_CODE_ADDRESS "Game Code"
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
loop_start:
lda loop_counter
tax
tay
lda HUD_ADDRESS, x // Load the char B
sta $0400, x // Screen RAM
tax // Transfer the numer of B to the x-register
lda CHARSET_ATTRIB_ADDRESS,x
sta $d800, y // Color RAM
inc loop_counter
jmp loop_start
loop_counter: .word 0 //192 // Define a temporary variable (initialized to 0)
loop_row_limit: .byte 0
But I probably hit the 255 limit.
With sprites, I've overcome affecting $D010 location, but now I don't know how to do it.
Any advice?
Thanks in advance!