Jump to content
  • entries
    649
  • comments
    2,587
  • views
    867,287

The Beginnings of SpiceC

SpiceWare

1,791 views

I've taken quite a bit of time off 2600 projects, was burnt out after the crunch to finish Draconian in time for PRGE - I even worked on it as my folks and I made our way to Portland, by way of the Grand Canyon!
blogentry-3056-0-25439100-1519173343_thumb.jpg

I'm once again interested in working on 2600 projects and started off by porting Stay Frosty 2's music driver from DPC+ to CDF format for John's port of Mappy. Can't wait to hear iesposta's audio wizardry in that project!

After finishing that I started in on my SpiceC framework. If you've not heard of it before, it's a new 2600 development environment to make it easier to write games. It'll be like batari BASIC with prewritten kernels and you only having to write the game logic. It'll differ in that it uses kernels written to take advantage of the CDF bankswitching (as seen in Draconian, Super Cobra Arcade, and the forthcoming Mappy), and all of your game logic will be written in C instead of BASIC. The game logic will run on the 70 MHz ARM processor found inside the Harmony Cartridge and Melody Board.

Here's an overview of how it works so far:
blogentry-3056-0-80300500-1519173053_thumb.png

Initialize SpiceC environment:
blogentry-3056-0-17457000-1519173060_thumb.png

Create a new project called test3, presented with the menu choices:
blogentry-3056-0-69714000-1519173063_thumb.png

Next option is the game kernel:
blogentry-3056-0-24624900-1519173068_thumb.png

If you don't know what a kernel supports you can ask for more detailed info:
blogentry-3056-0-69051900-1519173073_thumb.png

Next up is the score kernel:
blogentry-3056-0-60791500-1519173076_thumb.png

If all of your choices support Enhanced Audio you'll be prompted on that (if not you'll default to TIA ONLY):
blogentry-3056-0-29841300-1519173080_thumb.png

You'll then be given an overview of your choices:
blogentry-3056-0-93071700-1519173083_thumb.png

No will let you reselect your options while Yes will create a directory for your project as well as a configuration file:
blogentry-3056-0-57918300-1519173087_thumb.png
blogentry-3056-0-99958900-1519173091_thumb.png

Switch to your project directory and you can build it:
blogentry-3056-0-52272600-1519173096_thumb.png

which causes new files to show up in your project directory:
blogentry-3056-0-86009600-1519173100_thumb.png

The bulk of the source code is located elsewhere and currently builds a rainbow executable:
blogentry-3056-0-56563200-1519173104_thumb.png

Now that I have that working, I need to work on writing the various kernels - at the moment they are just full of comments:
blogentry-3056-0-54459700-1519173109_thumb.png

The comment line starting with SD is the Short Description and is displayed in the numbered selection list. The comment lines starting with LD contain the Long Description and are what you see if you ask for more detailed info. This means adding new kernels is just a matter of dropping them in the correct location, no changes will be required to the spicec.sh script. That comment line "supports enhanced audio" is how the script knows if a kernel can use enhanced audio or not.

Quite a bit more to do before y'all can use it, but I'm excited about the progress I've made so far.

  • Like 11


11 Comments


Recommended Comments

Exciting stuff! I have always been more at home with C than I have with assembler. Ideally, this will have the flexibility that I found missing in Batari (though it is a fine product in itself!).

  • Like 1

Share this comment


Link to comment

Awesome! I am likely to be an early tester/adopter when you have something that is ready for others to try.

  • Like 1

Share this comment


Link to comment

I'll be posting builds in the blog once I'm ready for testers, it'll probably be a couple months before that occurs. Eventually I'll look into getting a SpiceC subforum created under the Atari 2600 Programming forum.

 

Do note that SpiceC will be Linux Only. While what I have implemented so far works on a Mac, the ARM compiler does not. Mac and Windows users will need to set up a virtual machine. I'll go over how to set up VirtualBox, though it should be fine if you prefer something else like Parallels or VMware (I just won't know how to help if problems occur). Run Bash on Ubuntu on Windows might also be an option for Windows users, though likewise I'm not familiar with that.

  • Like 1

Share this comment


Link to comment

Question: do you have plans to support a kernel that will include a "score" option of your 32 character text display? This would open up a lot of possibilities in terms of the types of games that could be created.

  • Like 1

Share this comment


Link to comment

No rush on SpiceC. I'm learning C# (Unity) to get familiar with the syntax again.

 

I really need to figure out how to prioritize projects so as not to get burnt out. Seems like you have a handle on that :)

Share this comment


Link to comment

Don't worry, I'm not in a rush as I know that'll lead to me getting burnt out and putting it on the back burner.

 

That said, I was hoping to finish working out the requirements for 6507 kernels this weekend, but ended up having to revise dasm instead. The requirements are things like this for the Game Kernels:

   ; NOTE: Game Kernels must do the following when done
    ;   - Turn off all objects.  Colors, size, etc. can be left as is
    ;   - end with a jump to ScoreKernel on cycle 3
    sta WSYNC       ;
    jmp ScoreKernel ; 0  3

and this for the Score Kernels:

; Score kernel always starts on cycle 3
; all objects are turned off, but positions and state of things like NUSIZ0 are unknown
; use SUBROUTINE and .labels to prevent label conflicts with other code 
    SUBROUTINE RadarScoreKernel
.Start              ; -  3
    ldx #$44        ; 2  5
    stx COLUBK      ; 3  8
    ldy #16         ; 2 10
 
...
; Score Kernel must end on 76/0    
    sty WSYNC       ; - 76/0
There will be more, like both kernels always start at byte 0 of a page (so address of .Start could be $F500, but never $F501-$F5FF) so we won't have to worry about cycle counts for branches being inconsistent.
  • Like 1

Share this comment


Link to comment

spiCe

 

Thanks for the suggestion. I've debated this since you posted it and decided to stick with SpiceC for the same reason I changed from the original Spice C to SpiceC - searching:

Results are as of this reply, I'm sure they'll increase in the future.

  • Like 1

Share this comment


Link to comment

 

Thanks for the suggestion. I've debated this since you posted it and decided to stick with SpiceC for the same reason I changed from the original Spice C to SpiceC - searching:

Results are as of this reply, I'm sure they'll increase in the future.

 

sorry i never saw the name selection process.

 

regards.

Share this comment


Link to comment

No worries, the process was basically going with Spice C then realizing that if somebody searched for info on Spice C they'd have a difficult time as only 1% of the results would be relevant.

Share this comment


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...