Jump to content
IGNORED

a8 xl/xe benchmark test program (now works with 400/800 and 5200!)


doppel

Recommended Posts

I recently learned how to program for the Atari 8-bit computers when someone asked me to write a benchmark test program for them. It runs several speedtests to gauge how long things take, and outputs the results in the form of seconds, frames and scanlines (because cycle-precise timing doesn't seem to be possible on the A8 hardware). I have only been able to test it on the Atari800Win Plus emulator and have no actual hardware to test it on...

 

Anyway here it is. It's a standard 8K cartridge ROM that will run on any Atari 8-bit computer or the 5200. I also included the source if anybody's curious about that. The source assembles with ASM6.

 

Update: Fixed the bug pointed out by phaeron (thanks!). The program did not initialize port B of the PIA before

attempting to bank out the OS ROM. Now it does. Also, the program no longer accepts any key, now it only accepts the Start console key.

 

Update 2: Handled the reading of the Start Key more carefully. Also, fixed a major bug caused by an incorrect value being loaded into port B of the PIA. Apparently if the program was loaded into RAM as a binary and run (as opposed to a cart ROM), the program would bankswitch itself out of RAM after you pressed Start once the results were displayed, causing the computer to lock up. Not anymore. Thanks to sloopy for this one, although the cause of it eluded me for a while.

 

Update 3: Added two sorting speedtests.

 

Revision 2: Made quite a few changes, here they are:

 

A. It now works for the 400/800 models and yes, even the 5200!

 

B. It performs some calculations on each result obtained by the speed test counting code which essentially subtract all cycles stolen by the ANTIC and by the interrupt handlers, and rounds the result to the nearest scanline. So it's still a somewhat rough approximation, but now it's a more *accurate* one. :-)

 

C. There are now 16 speedtests in total. I split up the source code and put all the speedtests into a separate file to make it less unwieldy to look at/work with.

 

As always, be sure to contact me for any bugs, comments, questions, rants, berry fruit salads, or carbonated beverages you'd like to throw my way. :-)

bt2.zip

Edited by doppel
Link to comment
Share on other sites

Fails after pressing a key on Altirra and Atari800 2.1.0. Looks like you need to set DDRB on PIA to output before switching out the kernel ROM, i.e.

 

;switch PORTB to data direction register
lda #$34
sta pbctl

;set all port B bits to output
lda #$ff
sta portb

;switch PORTB back to output register
lda #$3c
sta pbctl

 

This is necessary since the PIA sets all registers to $00 on reset, and this causes all of the port B lines to switch to input.

  • Like 1
Link to comment
Share on other sites

here is a pic of it running on my 800XL... the file with the h in it has a binary load header... when i loaded it in spartados, the display list got screwed, but the machine was still working...

 

thanks doppel...

 

sloopy.

post-24811-126370258288_thumb.jpg

Link to comment
Share on other sites

  • 3 months later...

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