Jump to content
  • entries
    657
  • comments
    2,692
  • views
    897,854

SpiceC dasm usage figured out


SpiceWare

1,217 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_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:
blogentry-3056-0-95168900-1519958269_thumb.png


For the first test I selected the green game kernel and the 30 scanline red score kernel:
blogentry-3056-0-23550800-1519957580_thumb.png

blogentry-3056-0-64567000-1519957584_thumb.png

Next up, the blue game kernel without a score kernel:
blogentry-3056-0-22329900-1519957621_thumb.png

blogentry-3056-0-34799000-1519957624_thumb.png

Last test, the same blue game kernel with the 50 scanline white score kernel:
blogentry-3056-0-17908800-1519957662_thumb.png

blogentry-3056-0-26329700-1519957668_thumb.png

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.







  • Like 3

1 Comment


Recommended Comments

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.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...