Jump to content





The Beginnings of SpiceC

Posted by SpiceWare, in SpiceC 20 February 2018 · 1,218 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!
Attached Image
 
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:
Attached Image
 
Initialize SpiceC environment:
Attached Image
 
Create a new project called test3, presented with the menu choices:
Attached Image
 
Next option is the game kernel:
Attached Image
 
If you don't know what a kernel supports you can ask for more detailed info:
Attached Image
 
Next up is the score kernel:
Attached Image
 
If all of your choices support Enhanced Audio you'll be prompted on that (if not you'll default to TIA ONLY):
Attached Image
 
You'll then be given an overview of your choices:
Attached Image
 
No will let you reselect your options while Yes will create a directory for your project as well as a configuration file:
Attached Image
Attached Image
 
Switch to your project directory and you can build it:
Attached Image
 
which causes new files to show up in your project directory:
Attached Image
 
The bulk of the source code is located elsewhere and currently builds a rainbow executable:
Attached Image
 
Now that I have that working, I need to work on writing the various kernels - at the moment they are just full of comments:
Attached Image
 
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.






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

  • Report

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

  • Report

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.

  • Report

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.

  • Report

That's a very good idea!  I've added a Score/bitmap.asm stub as a reminder.

  • Report

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 :)

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

spiCe

  • Report

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.

  • Report

 

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.

  • Report

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.

  • Report

Search My Blog

Recent Entries

Recent Comments

Latest Visitors

1 user(s) viewing

0 members, 1 guests, 0 anonymous users