In the prior SpiceC blog post I showed what a config file would look like:
MENU_KERNEL = "Menu/48pixel.asm"GAME_KERNEL = "Game/maze.asm"SCORE_KERNEL = "Score/radar.asm"AUDIO = SAMPLES MAC DIGITAL_AUDIO lda #AMPLITUDE sta AUDV0 ENDM
A key part of that is the constants which specify which kernels were selected for the project. Using those, my plan was to do this in the 6507 source code:
GameKernel: INCLUDE GAME_KERNEL INCLUDE SCORE_KERNEL OverScan: ...
Turns out dasm does not support constants for include files!?!?!? So I updated dasm
After getting that issue resolved, I created a few dummy kernels that displayed different colors to confirm that the kernel selections were working correctly. A key part of how that works is all Score Kernels include a constant defining how many scanlines they'll use:
SCORE_SCANLINES = 30
and all the Game Kernels will self-adjust to use whatever is left:
ldx #192 - SCORE_SCANLINESKernelLoop: stx WSYNC ; DIGITAL_AUDIO ; 5 5 txa ; 2 7 and #15 ; 2 9 ora #$C0 ; 2 11 green sta COLUBK ; 3 14 dex ; 2 16 bne KernelLoop ; 2 18
I do plan to allow some control for the score kernel heights - you'll be able to adjust the font size so the config file will contain something like:
SCORE_FONT_HEIGHT = 8
while the score kernels would use:
SCORE_SCANLINES = 22 + SCORE_FONT_HEIGHT
I also modified the short descriptions in the kernels to show the colors to make it easier to test:
For the first test I selected the green game kernel and the 30 scanline red score kernel:
Next up, the blue game kernel without a score kernel:
Last test, the same blue game kernel with the 50 scanline white score kernel:
So now that I've figured out how the dasm side of the projects will work, I need to figure out the C side. I suspect this next part will take a month or two.
- 3
1 Comment
Recommended Comments