Jump to content





SpiceC dasm usage figured out

Posted by SpiceWare, in SpiceC 01 March 2018 · 419 views

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_SCANLINES
KernelLoop:   
        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:
Attached Image
 
 
For the first test I selected the green game kernel and the 30 scanline red score kernel:
Attached Image
 
Attached Image
 
Next up, the blue game kernel without a score kernel:
Attached Image
 
Attached Image
 
Last test, the same blue game kernel with the 50 scanline white score kernel:
Attached Image
 
Attached Image
 
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.
 
 
 
 
 
 
 
 






I've changed the name from Spice C to SpiceC so searching for info about it will be easier in the future.  An AtariAge search of Spice C returned 833 hits for me, which is the exact same results as a search for just Spice so the lone C is being ignored.

  • Report

Search My Blog

Recent Entries

Recent Comments

Latest Visitors

0 user(s) viewing

0 members, 0 guests, 0 anonymous users