Hi Peter, BigEd
BigEd gets about - he has been looking at my articles on hackaday on the self-designed programming language (derived from BASIC) that I have created, and saw some of my ideas for commands to support game programming. He then linked me back to here - very interesting work Peter and love the cloud based approach to hosting the IDE and simulator.
I am assuming that you have some hardware abstraction layer so that your application software will work on the real and simulated hardware and this is the API you refer to? I'm guess from there that you have libraries in the simulator and real hardware which conform to the API to enable the portability?
My approach is somewhat less sophisticated in one sense (although I have built an entire interpreted language from scratch in 65c02 assembly - that took a lot of effort!). I commands which reflect the underlying hardware quite closely. I have a TMS9918 which supports hardware sprites, and an AY-3-8910 which provide 3 channel (+1 noise channel) sound which can be modified by certain envelope settings.
So my BASIC commands for supporting hardware sprites include:
Code:
spritepat <patnum>,<array>
spritepos <sprnum>,<x>,<y>
spritecol <sprnum>,<col>
spritenme <sprnum>,<patnum>
sprite <sprnum>,<x>,<y>,<patnum>,<col>
Sound commands include:
Code:
sound <chan>,<period>,<vol>
music <chan>,<octave>,<note>,<vol>
play <tone>,<noise>,<env>,<period>
Input commands include:
Code:
int=stick(<stickmask>)
int=key(<asyncmode>)
I also have various commands to clear the screen, plot a string at any coordinate and change screen modes (I support 40 column monochrome and 32 column multicolour modes).
I have no bitmap graphics support hence no LINE or DRAW commands, although I do have vpoke and vpeek to enable direct writing to the video RAM (which is not shared by the 6502).
So two different approaches - the API approach you have taken is the modern approach of course, whereas mine is a lot like many home computers of the 80s in which the OS was intimately tied to the specific hardware set up. We know which approach prevailed!
Cheers, Dolo