Jump to content
IGNORED

mos6507's Blog - Chimera Command Queue (API)


RSS Bot

Recommended Posts

When Chimera is serving out queues, it's acting like the DPC chip in Pitfall II. It's an impressive enough feat, but simple enough to have been done in programmable logic. But the big distinction with Chimera is having it do more calculation-heavy operations that only a true processor could do. So we've specced out a scheme for sending commands to the ARM and polling for execution status. This is pretty exciting because it's really using the ARM as a true coprocessor for the first time.

 

The structure of a command is in this format:

 

function ID (16-bit number)

argument1, argument2, argument3, etc...

busy-wait for status hotspot to go to $FF (first access to status hotspot acts as start execution command)

 

This is how it would look in assembly:

 

;FUNCTION ID
LDA $00
STA CH_COMMAND
LDA $01
STA CH_COMMAND

;ARGUMENTS
LDA $01
STA CH_COMMAND
LDA $02
STA CH_COMMAND
LDA $03
STA CH_COMMAND

.WAIT_FOR_STATUS
LDA CH_STATUS
CMP #$FF
BNE .WAIT_FOR_STATUS

 

Now yes, there is some CPU overhead on the VCSs part in calling these functions. So for simple assignment of Chimera attributes, we have some shortcuts. For instance, to set a queue attribute, or seek or clear queues, you can just call a single function with a range of queues.

 

Coming up with the function list and the parameters will be a big part of the beta program. Ultimately only ARM firmware flash space will be a limiting factor.

 

Until now, this has all been theoretical, but last night we actually got the first few functions operational. So we can set the queue step value (signed byte), the queue length (currently limited to 256) and, most impressive to me at least, print a character at a desired row and column. So now that we have the command parser working, I expect the command library to quickly grow. We'll try adding some extra queue read options, like reversing bit order (good for playfield) or maybe masking like Pitfall II does it, and see if we can still maintain the timings in the kernel. I also wanted to see some drawing primitives, lines, boxes, circles, points. Not sure how far we'll go with it because priority is still on getting the game select menu up and running.

 

http://www.atariage.com/forums/index.php?a...;showentry=5032

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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