Jump to content
  • entries
  • comments
  • views

DPC+ ARM Development



NOTE: This blog series is obsolete.  Head on over to the Harmony/Melody Club where you'll find information on the new Linaro compiler and the new CDFJ coprocessor/bankswitch scheme that has many improvements over DPC+.


I'm going to start up a new series on doing ARM development for DPC+. The ARM code is written in C and the C compiler we'll be using runs under Linux.


If you're using Linux you'll just need to install the C compiler. However, if you're using Mac OS X (like me) or Windows, then you'll need to set up a VM (virtual machine) so you can run Linux as a guest under your OS of choice. I've been using Parallels Desktop ($80) for years, but any VM should do. I'm aware of VMware Fusion ($70) and VirtualBox ($0).


Since VirtualBox is free, I'll start off the series with how to set up Linux on it. It's a bit more involved than under Parallels, but not difficult.


The next entry will be setting up the C compiler. Future entries will go over writing a simple DPC+ with ARM game - most likely a more advanced version of Collect.

  • Like 1


Recommended Comments

Did you run into issues with getting an ARM cross compiler up and running under OS X? Or was there another issue that forced you into using a VM?


Is there any public documentation on the internals of the Harmony cart? I've been thinking of taking a look at doing some ARM coding on the Harmony, but I always end up wanting to know details like how memory is setup, what ARM variant is being used, how does communication happen between the 2600 and the ARM, etc, etc.

Link to comment

When I started work on Stay Frosty 2, I was using an ARM compiler than ran under OS X. I switched to a different compiler because it generated significantly smaller code. I think it was 8-9% smaller, will post specifics in Part 12 of The Story of Stay Frosty 2.

The new compiler wasn't available for OS X. I already had a Linux VM running under Parallels* so it wasn't any extra work for me to use the compiler under Linux.


I'm not aware of any public documentation on the internals, but I'll be putting that information out as part of this series.



* Looks like I've been using Parallels since June 2006. VirtualBox was released in 2007.

Link to comment

Your welcome!


Was going to post part 2 today, but woke up under the weather. Cancelled brunch plans with my folks and went back to bed. Just got up a little bit ago and though I'd catch up on things while I felt a little better.


Feeling rough again now though, so I'm off to veg out on the couch and watch some TV. Maybe I'll put a dent in the 1400+ shows my Mac mini DVR has recorded for me :)

Link to comment

Is there any public documentation on the internals of the Harmony cart?


Latest entry in this series has info on the internals.

Link to comment

Hmm I'm tempted to try this but it may get me off track. Do you think this helps the novice Stella programmer by adding capability and flexibility? Or do the added complications just make it too difficult?

Link to comment

Are you familiar with C? If so it may make things easier, if not it'll add something else to learn.


Do note that this series is currently on the back burner, by step 11 you'll only have a playfield with non-moving sprites. That said, if you successfully get that far it'll inspire me to get back to work on it :)

Link to comment

Nah- I'm not familiar with C. I'd like to be, though. Same for Linux.


I saw Draconian on YouTube and was blown away so I thought I'd look into the DPC+.


But given what you've told me, I should probably complete at least one functioning 2K game first, before looking into it again. That will give you more time to finish as well :)



Link to comment

Looking into this again.. I've been learning Unix and Linux in my job and I have Ubuntu on VirtualBox here at home so that will be a little easier. But the C- its still a requirement? How much would I have to learn? Is there a resource you recommend?

Link to comment

There is another option - ARM assembly ;)

I learned C so long ago that I'm not familiar with online resources. This C Tutorial might be useful, though be aware that any function that needs an include statement won't be useful for 2600 development. Example of that would be getchar() and printf() which need #include <stdio.h>. That said, you can still work through the tutorial, using the compiler under Ubuntu, to learn C.


After the holidays I'll be working on Spice C, a new framework for 2600 development that'll be like batari BASIC with prewritten kernels, but will use C (instead of basic) and the new CDF bankswitch driver. Once that's far enough along I'll start a tutorial in the blog, and I won't assume everybody already knows C.

Link to comment

assembly language is the human readable language closest to what a CPU natively understands. CPUs are not all designed the same, so you need to use the correct assembly language for the CPU you are coding for:

  • 6502 assembly - Atari 2600 as it contains a 6507 CPU (which is a cost reduced 6502)
  • Z80 assembly - ColecoVision as it contains a Z80 CPU
  • ARM assembly - Harmony Cart/Melody board as it contains an ARM CPU
Link to comment

Here is an index to all the DPC+ARM blog posts by Darrell:


Note that Parts 1 - 5 are about setting up a VM with the ARM compiler, which is probably outdated now. Maybe someone can create a Docker image containing a ready-to-go DCP+ARM development environment?


And some other interesting related posts:


Edited by Dionoid
  • Like 2
Link to comment
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.

  • Recently Browsing   0 members

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