Jump to content
IGNORED

Sprite and map scrolling demo on Tandy CoCo 3


JamesD

Recommended Posts

A new Sprite and map scrolling demo on the Tandy CoCo 3. Sort of a proof of concept.

As I said before, a little CPU horsepower and more RAM and you can do sprites without hardware.

The video is a little choppy and doesn't show how smooth the actual animation really is.

Link to comment
Share on other sites

It looks terrific! I'm particularly impressed since I've made small attempts at programming for the CoCo and have some small sense of how tough that sort of thing is.

 

As a side note, I often wonder how my programming youth was shaped by having a CoCo as my first (and basically only) home computer, since it had neither hardware sprites nor a synth chip. Things that would've been a piece of cake on the C64, for example, were thus a pain in the neck on the CoCo. Don't get me wrong, I love the CoCo, but if we'd had a different machine, I might well have gotten more into programming, and become a programmer instead of what I do now (dabble in programming, but mostly other stuff). I was a little shocked when I looked at the C64 BASIC programming manual recently and saw how easy it was for them to do this stuff!

Edited by thegoldenband
Link to comment
Share on other sites

The 6809 can really move some data if you disable the interrupts and use multiple PULS/PSHU instructions that copy 6 or 7 bytes at a time. It's not quite as good as the Z-80's LDIR, but it's a lot better than anything the 6502 can do. This is from a graphics mode screen driver that I wrote for OS9.

 

SCRUP PSHS U,Y,D
LDX #0
BSR SCRADR
LEAU 6,Y
LEAX $1800,Y
CLR ENDSCR
STS SPSAV
LEAS 256,Y
SCRUP1 PULS D,X,Y
PSHU Y,X,D
LEAU 12,U
PULS D,X,Y
PSHU Y,X,D
LEAU 12,U
PULS D,X,Y
PSHU Y,X,D
LEAU 11,U
PULS A,X,Y
PSHU Y,X,A
LEAU 11,U
DEC ENDSCR
BNE SCRUP1
LEAY -256,S
LDS SPSAV
LDU 4,S
LBSR CLRLN0
PULS D,Y,U,PC

...of course if you have a 6309 you can use the TFM instruction instead.

Link to comment
Share on other sites

  • 1 month later...

This is a great piece of code!

 

I've decided to jump back to the CoCo 3 for a while. It's a fun machine, and has some graphics tricks of it's own.

 

Thanks guys! I'm the guy who coded that demo.

Indeed as Bruce said, the 6809 can really move a lot of data with its "MMX"-like instruction. In fact they are 'SIMD' (single-instruction, multiple data).

For example, the instruction:

pshs d,x,y,u,dp,cc

writes a string of 10 bytes and requires 15 clock cycle. (In 16 color mode, this means you can set 20 pixels in one instruction, faster than 1 pixel per clock). Thus the CoCo 3 can yield a maximum fillrate of 1193333 bytes per second (i.e.: 1.1 MB/sec). Do you know if any other 8-bit computer faster than that?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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