Jump to content

PETARI: Commdore PET emulator for Atari XL/XE


28 replies to this topic

#1  

    Star Raider

  • 59 posts
  • Joined: 24-July 07

Posted Fri Nov 13, 2009 11:47 PM

PETARI: Commdore PET emulator for Atari XL/XE
Version 0.5
This is the first release, it has not been tested on a real machine yet.

Attached File  petari_0.5.zip   12.3K   138 downloads

Screenshots:
Attached Image: petari_ouranos.JPG
Attached Image: petari_spacei.JPG
Attached Image: petari_starforce.JPG
Attached Image: petari_microchess.JPG

PETARI 0.5 Documentation

PETARI is a Commodore PET emulator for the Atari XL/XE.
It emulates a 40-column PET. Joysticks and sound are supported. A mini-DOS supports limited disk access.

INSTALLATION:

For reasons of copyright, the official distribution of PETARI does not include the needed ROMs.
The ROMs need to be appended to the end of the .XEX file.
For example:
copy /b petari1_stripped+chargen+basic1+edit1g+kernal1 petari1.xex
copy /b petari2_stripped+chargen+basic2+edit2g+kernal2 petari2.xex
copy /b petari4_stripped+chargen+basic4+edit4g40+kernal4 petari4.xex

USAGE:

Press START after loading a program to apply patches if necessary.
For example, if the keyboard doesn't work.
If the screen flashes after pressing START then a patch was applied.
It is only necessary to press START once. If there was no flash, that program does not need a patch.

The disk access is limited to loading, saving, and reading the directory. Deleting and overwriting files are not supported. Having more than one file open at once is not supported.
4 drives are supported (D1:-D4:) as drives 8, 9, 10 and 11. Wildcards are supported (* and ?).
Only standard 90K Atari DOS2.0S disks are supported. Double and Extended density disks are not supported.
Filenames are 11 characters long (8+3). The 8.3 format is not used, the extension becomes part of the filename.
Saving files is not fully tested. Do not use PETARI to save to a disk containing important data.
Examples:
Load the directory of D1: and display it:
LOAD "$",8
LIST
Load the first file from D2: and run it
LOAD "*",9
RUN
Save a file named "FILE" to D4:
SAVE "FILE",11

JOYSTICK:

The joystick can be reprogrammed by using BASIC poke statements.
fire button: poke 59600,X
down-right poke 59605,X
up-right poke 59606,X
right poke 59607,X
down-left poke 59609,X
down-right poke 59610,X
left poke 59611,X
down poke 59613,X
up poke 59614,X

Replace X with the Atari scan-code for the key to be used.
Default settings are the number pad and A for fire.

CREDITS
The IEEE-488 patch to BASIC 1 is from VICE.
Atari800 was used to help develop PETARI.

#2  

    Moonsweeper

  • 423 posts
  • Joined: 11-March 06
  • Atarian at 8, 16, 32 and 64 Bits
  • Location:north west in Germany

Posted Sat Nov 14, 2009 1:40 AM

Awesome first release!

Kinda interesting to emulate even older machines on our old machines :)

#3  

    Moonsweeper

  • 422 posts
  • Joined: 10-April 07
  • Location:Canada

Posted Sat Nov 14, 2009 9:36 AM

View PostBeetle, on Sat Nov 14, 2009 1:40 AM, said:

Kinda interesting to emulate even older machines on our old machines :)

I agree with that. I once used an Amiga 500 to emulate MS-DOS to run a DOS Atari 800 emulator. Now I can emulate a PET inside that Atari emulator and "quad-emulate" on my Amiga. (...or is that "tri-emulate"? I've lost count. ;)) No, now that I've got a real Atari, I'll just run it on that.... until I get a real PET.

Thanks for the emulator, perry_m. The screenshots look great. Is there a way to make the PET emulator green on black? To me, a PET isn't a PET unless it's green-screen.

#4  

    River Patroller

  • 4,679 posts
  • Joined: 28-January 04
  • (Bubsy Bobcat fan)
  • Location:Kuwait- UAE

Posted Sat Nov 14, 2009 12:19 PM

Wow this is simply amazing. I was still amazed by the Apple 2 emulator a while back, but this is cool too.

How is this even possible?

#5  

    Moonsweeper

  • 352 posts
  • Joined: 19-April 06
  • Location:Winston Salem, NC

Posted Sat Nov 14, 2009 2:17 PM

View PostMr.Amiga500, on Sat Nov 14, 2009 9:36 AM, said:

View PostBeetle, on Sat Nov 14, 2009 1:40 AM, said:

Kinda interesting to emulate even older machines on our old machines :)

I agree with that. I once used an Amiga 500 to emulate MS-DOS to run a DOS Atari 800 emulator. Now I can emulate a PET inside that Atari emulator and "quad-emulate" on my Amiga. (...or is that "tri-emulate"? I've lost count. ;)) No, now that I've got a real Atari, I'll just run it on that.... until I get a real PET.

Thanks for the emulator, perry_m. The screenshots look great. Is there a way to make the PET emulator green on black? To me, a PET isn't a PET unless it's green-screen.


Now this would be interesting - and worth a video to see it happen! Boot up a Windows machine, and run an Amiga emulator. Within that, run the MS-DOS emulator. Within that, run your A800 emulator. And now, within that, run this Pet emulator. LOL...!

#6  

    Dragonstomper

  • 533 posts
  • Joined: 16-July 03
  • Location:Berlin, Germany

Posted Sat Nov 14, 2009 2:39 PM

View PostTimsterAA, on Sat Nov 14, 2009 2:17 PM, said:

Now this would be interesting - and worth a video to see it happen! Boot up a Windows machine, and run an Amiga emulator. Within that, run the MS-DOS emulator. Within that, run your A800 emulator. And now, within that, run this Pet emulator. LOL...!
Why not try this from a MAC or a Linux machine ;) Start your machine, run the windows, then run the amiga...

Or better... run your Nokia N95, start dosbox, start win95, start winuae...

#7  

    Moonsweeper

  • 422 posts
  • Joined: 10-April 07
  • Location:Canada

Posted Sat Nov 14, 2009 3:39 PM

I like it better when older machines emulate newer machines. On my 1987 A500, I emulated 1998 MacOS 8.1. (...and in that I emulated....)

But emulation of anything on such an old computer as an Atari 8-bit is very impressive indeed.

#8  

    Stargunner

  • 1,398 posts
  • Joined: 01-February 04
  • Stay Atari!
  • Location:Warsaw, Poland

Posted Sun Nov 15, 2009 11:03 AM

Very interesting and promising project!

I've merged the files as it was descibed in first post (and in doc-file as well). I took the ROM-files form latest VICE release and ran combine.bat from "your" petari archive.

The only worked file I found is petari2.xex although it works only in emulator (I've tested it on PLus 4.0). On real machine I wasn't able to load anything from ATR.

Strange thing is: the drives are shown with "offset" (ie. D1: is visible as 9, D2: as 10 etc.).

What's more "joystick-patch" works - tested on Space Invaders and StarWars.

Maybe add option to remap PET-joystick to atari-one. :)

Overall - good job for a first release. Posted Image

#9  

    Stargunner

  • 1,398 posts
  • Joined: 01-February 04
  • Stay Atari!
  • Location:Warsaw, Poland

Posted Sun Nov 15, 2009 12:10 PM

Oh, seems that PETARI1 works, too. Only PETARI4 seems to be "not so working".

#10  

    Stargunner

  • 1,398 posts
  • Joined: 01-February 04
  • Stay Atari!
  • Location:Warsaw, Poland

Posted Sun Nov 15, 2009 3:23 PM

One more note - when load/save produces "nothing", try turning off "SIO patch".

#11  

    Stargunner

  • 1,398 posts
  • Joined: 01-February 04
  • Stay Atari!
  • Location:Warsaw, Poland

Posted Tue Nov 17, 2009 3:42 PM

OK, did some test on PETari (using AtariWinPLus 4.0).

1. Killer poke test - turning off screen-update checking:



2. Listing and running programs (introducing Ouranos game):



3. Running Space Invaders (machine language program form BASIC):

.

Have fun! :)

#12  

    Quadrunner

  • 7,942 posts
  • Joined: 30-September 01
  • Location:Baden-Württemberg, Germany

Posted Tue Nov 17, 2009 4:30 PM

Miker,great videos...

Jesus... the cbm dos appeared very long on the cbm machines... ;) I guess there is not much difference in the pet dos than in the c128 dos when looking at the LOAD"$",10... ;)

and the sound fx of the space invaders sound familiar... ;) does the PET do not have any gfx mode instead of the text modes?

anyway good work so far... ;) any PET classic which we should test as game?

#13  

    River Patroller

  • 2,184 posts
  • Joined: 26-February 03
  • Beeping the horn on the data bus
  • Location:Leeds, U.K.

Posted Wed Nov 18, 2009 2:00 AM

View PostHeaven/TQA, on Tue Nov 17, 2009 4:30 PM, said:

Jesus... the cbm dos appeared very long on the cbm machines... ;) I guess there is not much difference in the pet dos than in the c128 dos when looking at the LOAD"$",10... ;)

Yup, it all dates back to the PET including the variation of Commodore BASIC used in the C64, C16/Plus/4 and C128 - i think the default device number for the drive is 8 on the PET as well...?

View PostHeaven/TQA, on Tue Nov 17, 2009 4:30 PM, said:

and the sound fx of the space invaders sound familiar... ;) does the PET do not have any gfx mode instead of the text modes?

Nope, regardless of model the PET only has a ROM font and some screen RAM - the resolution in use varies between machines (some later models have 80 column displays) and user-defined graphics have been produced by constantly changing the contents of the screen as the refresh goes past, but getting that to work on all models of PET is... well, challenging. Technically the machine doesn't have sound either (or at least the early models don't, the later ones have a "bell" but i'm not sure how flexible it actually is) - there was a quick flash at 48 seconds into the PET Invaders video where the wiring for the hardware used for the sound in game is displayed; my own PET game Blok Copy uses the same hardware to play music (a somewhat gleepy two channel rendition of a ProTracker module using a truly horrendous step time driver i coded) and handle in-game sound effects.

#14  

    Stargunner

  • 1,398 posts
  • Joined: 01-February 04
  • Stay Atari!
  • Location:Warsaw, Poland

Posted Wed Nov 18, 2009 2:50 PM

Yeah, CBM's device 8 should be read as D1:. Howewer, after (re)linking PETari files with PET roms when I ran them on PLus, I've encountered strange drive "offset" (told about it in one of earlier posts here in this thread). So, having petari.atr as D1: and games.atr as D2: I call device 10 (yeah, there should be 9, but it point to D1: and device 8 is unaccessible).

#15  

    Star Raider

  • 56 posts
  • Joined: 31-October 05
  • Dunno
  • Location:Crewe, Cheshire, UK.

Posted Wed Nov 18, 2009 3:57 PM

I can't get PETAri to work :-( Any help?

Regards,

Shaun.

#16  

    Preppie!

  • 5,893 posts
  • Joined: 17-December 06
  • It's easy living in a bubble

Posted Wed Nov 18, 2009 6:08 PM

View PostShaun.Bebbington, on Wed Nov 18, 2009 3:57 PM, said:

I can't get PETAri to work :-( Any help?

Regards,

Shaun.
nor can I, can I have an idiots guide:dunce:

#17  

    Stargunner

  • 1,980 posts
  • Joined: 04-August 03

Posted Wed Nov 18, 2009 6:54 PM

Yeah, where can we download the PET ROM images? :D

Anyway, may first question would be: Is this a realtime emulator? Or still 50% or 25% of original machine's speed? :D
Just like the Spectrum emulator at 10%? Or realtime?

#18 ONLINE  

    Quadrunner

  • 9,713 posts
  • Joined: 29-September 05
  • Location:Australia

Posted Wed Nov 18, 2009 7:47 PM

Practically all the C= 8-bit machine ROM images are in WinVICe.

#19  

    Star Raider

  • 59 posts
  • Joined: 24-July 07

Posted Sat Nov 21, 2009 9:56 PM

PETARI 0.6 now available.

Changes in version 0.6:
* Fix drive numbers
* Customize colours
* PET user port joystick
* SIO retry and some error handling

INSTALLATION:

For reasons of copyright, the official distribution of PETARI does not include the needed ROMs.
The ROMs need to be appended to the end of the .XEX file.
For example:
copy /b petari1_stripped+white+chargen+basic1+edit1g+kernal1 petari1.xex
copy /b petari2_stripped+white+chargen+basic2+edit2g+kernal2 petari2.xex
copy /b petari4_stripped+white+chargen+basic4+edit4g40+kernal4 petari4.xex

For a green coloured version, replace "white" above with "green"
To customize the colours, create a 2 byte file with the foreground and background colours you want and use it in place of "white".

User-port joysticks
To replace the keyboard joystick with the PET's native user-port joysticks,
use poke 59601,0
To revert back, use poke 59601,255
Two joysticks are supported this way.

Attached File  petari_0.6.zip   12.97K   91 downloads

#20  

    Moonsweeper

  • 422 posts
  • Joined: 10-April 07
  • Location:Canada

Posted Sat Nov 21, 2009 10:03 PM

Oooh... "customize colours"... awesome. :cool:

#21  

    Quadrunner

  • 5,743 posts
  • Joined: 19-February 03
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sun Nov 22, 2009 12:11 AM

Impressive!

Space Invaders brought back memories from 1980, freshman year of high school. The school I went to in McHenry, IL had a bunch of PETs and a hacked hamburger radio that plugged in for sound. I wrote a version of PacMan for it in BASIC. It was horrendously slow. We moved to Texas before I learned machine language on my VIC 20 so I never got a chance to speed it up. A friend told me that they later ran it through a basic compiler and it was very snappy after that.

I was under the impression the Atari was limited to 24 lines of text, how do you handle the PET's 25 line display?

#22  

    Quadrunner

  • 7,942 posts
  • Joined: 30-September 01
  • Location:Baden-Württemberg, Germany

Posted Sun Nov 22, 2009 2:58 AM

SpiceWare...

due to custom display list you can define more char lines...

#23  

    Quadrunner

  • 5,743 posts
  • Joined: 19-February 03
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sun Nov 22, 2009 11:42 AM

Thanks for the info!

#24  

    Stargunner

  • 1,398 posts
  • Joined: 01-February 04
  • Stay Atari!
  • Location:Warsaw, Poland

Posted Sun Nov 22, 2009 11:59 AM

OK, I'm now able to load and run programs using it on real Atari but it works only when QMEG OS (version 4.04) is turned on. Still can't load anything without that.

Moreover - there's annoying constant noise after loadng petari1 or petari2, similar to the sound present during saving to tape (sometimes they run quietly but only sometimes). It happens also on real stuff, on emulators they seem to run quietly.

Edited by miker, Sun Nov 22, 2009 12:12 PM.


#25  

    Stargunner

  • 1,398 posts
  • Joined: 01-February 04
  • Stay Atari!
  • Location:Warsaw, Poland

Posted Tue Mar 16, 2010 10:30 PM

Any news on this great project?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users