Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » Beam-Racing cycle-counted game
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Beam-Racing cycle-counted game [message #384424] Thu, 13 June 2019 19:04 Go to next message
Vince Weaver is currently offline  Vince Weaver
Messages: 136
Registered: April 2013
Karma: 0
Senior Member
So someone asked my how practical my bream-racing rasterbar demo was, so
I thought I'd see if I could used the enhanced lores colors to make a game.

Check it out here:
http://www.deater.net/weave/vmwprod/space_bars/

It's not much of a game, but it's playable. Really nice 192-line 60Hz smooth
vertical scrolling with a 15-color sprite. Of course horizontal scrolling
is always a problem in these lo-res modes.

In any case, the game is playable, but not really all that interesting.
I also used up pretty much all 4550 cycles in the VBLANK, but at the same
time the code is really inefficient in places. Cycle-counted code is such
a pain to write.

Vince
Re: Beam-Racing cycle-counted game [message #384426 is a reply to message #384424] Thu, 13 June 2019 23:50 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Anthony Adverse

> In any case, the game is playable, but not really all that interesting.
> I also used up pretty much all 4550 cycles in the VBLANK, but at the same
> time the code is really inefficient in places. Cycle-counted code is such
> a pain to write.
>
> Vince

That looks sexy!

A
Re: Beam-Racing cycle-counted game [message #384434 is a reply to message #384424] Fri, 14 June 2019 10:31 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Frank M.

Wow that's really something!

Now I understand why graphics on the Atari 2600 looked like they did. The side-scroller part makes me think of the homebrew game "Oystron".

https://en.wikipedia.org/wiki/Oystron

f
Re: Beam-Racing cycle-counted game [message #384462 is a reply to message #384424] Sun, 16 June 2019 18:50 Go to previous messageGo to next message
Michael AppleWin Debu is currently offline  Michael AppleWin Debu
Messages: 1262
Registered: March 2013
Karma: 0
Senior Member
On Thursday, June 13, 2019 at 4:04:01 PM UTC-7, vi...@pianoman.cluster.toy wrote:
> Cycle-counted code is such a pain to write.

Yup!

If you want to minimize some of that pain you can always use AppleWin's built-in debugger PROFILE command to help with this:

<F7>
PROFILE RESET
BPX ####
G
PROFILE LIST

This way you'll get a nice break-down of all the executed instruction and their total cycles and percentage. You can also continue to use PROFILE LIST to get a running total to-date of metrics. :-)

Of course if you are using it for disk access then all bets are due to not emulating the Disk II timing properly (well, until .WOZ gets supported.) :-/ Still, better then nothing!

Cheers,
Michael
Re: Beam-Racing cycle-counted game [message #384465 is a reply to message #384462] Sun, 16 June 2019 22:53 Go to previous message
Vince Weaver is currently offline  Vince Weaver
Messages: 136
Registered: April 2013
Karma: 0
Senior Member
On 2019-06-16, Michael 'AppleWin Debugger Dev' <michael.pohoreski@gmail.com> wrote:
> On Thursday, June 13, 2019 at 4:04:01 PM UTC-7, vi...@pianoman.cluster.toy wrote:
>> Cycle-counted code is such a pain to write.
>
> Yup!
>
> If you want to minimize some of that pain you can always use
> AppleWin's built-in debugger PROFILE command to help with this:

Usually it's not a matter of knowing the cycle count per instruction, as
I've done this long enough I can easily add things up.

The big pain is when I add a few instructions and suddenly the vapor
lock is gone and I have to track down why. It's almost always because
some branches got pushed so they straddle a page boundary. There's not
much that can be done about that, though I sometimes add some ASSERTs to
the source code so I know where it's happening.

The same can happen if data crosses a page boundary, but I usually
just align everything to death so that doesn't happen.

The other annoyance is usually I have VBLANK routine that needs to be 4550
cycles, so I have a big delay at the end to make up the difference. But
every time I make changes, I have to go and update that delay so the total
is 4550 again. I could probably set up some tooling to do it at least
semi-automatically, but so far it hasn't been worth the trouble.

Vince
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Cracking Buzzard Bait
Next Topic: Mockingboard vrs Phasor interrupts are different?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon May 13 16:44:23 EDT 2024

Total time taken to generate the page: 0.02343 seconds