-ST Emulation on Firebee? -

All things related to the Atari Coldfire Project

Moderators: Mathias, Mug UK, [ProToS], moondog/.tSCc., Galvez, Moderator Team

-ST Emulation on Firebee? -

Postby warp12 » Tue Jun 26, 2012 5:05 pm

I'm seriously considering a Firebee, from here in the states. I am curious, would it be possible to compile an emulator (Steem, Hatari, etc) to run classic ST(e) games? Does the Firebee have the hardware to support such an endeavor?

I know that market segment is not exactly the target, but it would be a nice perk for those who like the classics.

Shane
Shane
warp12
Atari freak
Atari freak
 
Posts: 73
Joined: Fri Jun 12, 2009 7:03 pm

Re: -ST Emulation on Firebee? -

Postby joska » Tue Jun 26, 2012 5:24 pm

I don't know if it's powerful enough to emulate a complete ST. But the Firebee doesn't have to. It has most ST-hardware, basically you only need to emulate the CPU and set up the Videl in "shifter-mode" to emulate an ST. Nobody has done it (yet) though.
Jo Even

Firebee - Milan060 - Falcon040 - Falcon030 - FreeMiNT - XaAES - MIST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
joska
Atari God
Atari God
 
Posts: 1834
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway

Re: -ST Emulation on Firebee? -

Postby Zogging Hell » Tue Jun 26, 2012 5:57 pm

Winston used to run at about 90-98% ST speed on my old Pentium 233mhz laptop with 64mb of memory and Windows 98, the Firebee has invisible OS comparatively, so surely something is possible (especially as there is less to emulate). Winston did quite a good job of running games, even though it isn't the most accurate or best of the emulators.
Firebee, Falcon CT60, Milan 040, Falcon MkI, TT, Mega STe, Mega ST + Lots of STs of various flavours
User avatar
Zogging Hell
Atari Super Hero
Atari Super Hero
 
Posts: 650
Joined: Sat Apr 29, 2006 12:08 pm
Location: Bristol, UK

Re: -ST Emulation on Firebee? -

Postby Klapauzius » Wed Jun 27, 2012 8:02 am

warp12 wrote:I am curious, would it be possible to compile an emulator (Steem, Hatari, etc) to run classic ST(e) games? Does the Firebee have the hardware to support such an endeavor?


There may also be a chance to convert games 'natively' to the FireBee, without using a dedicated emulator. It's a bit too early to promise anything, but it's something I'd surely like to try.

warp12 wrote:I know that market segment is not exactly the target, but it would be a nice perk for those who like the classics.


Initially, I was thinking along the same lines. But don't worry, you're not alone with this wish. :)
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.
User avatar
Klapauzius
The Klaz
The Klaz
 
Posts: 4298
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria

Re: -ST Emulation on Firebee? -

Postby oehansen » Wed Jun 27, 2012 2:47 pm

These instructions create illegal instruction exception, and they can be simulated in machine code. Here is a simple example ....

; MSB in D2 (for .B .W .L rotate), Count in D3 on entry
entry:
ror: lsr.l d0
bcc skip
or.l d2,d0
skip: subq.l #1,d3
bne.s ror

Of course it requires an exception handler, that decodes the instructions that generated the exception, and calls the emulations for these instructions. This should be quite doable, for at least the most "important" instructions, if not all ... but ROR/L I deem to be extremely important.
oehansen
Captain Atari
Captain Atari
 
Posts: 227
Joined: Tue Apr 17, 2012 12:05 pm

Re: -ST Emulation on Firebee? -

Postby Klapauzius » Wed Jun 27, 2012 3:30 pm

FireTOS already has this kind of exception handling for the unimplemented 68k instructions and addressing modes, using the CF68KLib.
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.
User avatar
Klapauzius
The Klaz
The Klaz
 
Posts: 4298
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria

Re: -ST Emulation on Firebee? -

Postby Orion_ » Wed Jun 27, 2012 3:55 pm

Klapauzius wrote:
warp12 wrote:I am curious, would it be possible to compile an emulator (Steem, Hatari, etc) to run classic ST(e) games? Does the Firebee have the hardware to support such an endeavor?


There may also be a chance to convert games 'natively' to the FireBee, without using a dedicated emulator. It's a bit too early to promise anything, but it's something I'd surely like to try.


I was wondering about the same thing, hacking the games like the awesome CT60 versions available on dbug or on your website.
That would be so cool to play good old ST game on firebee !
`^-._ website - twitter - vimeo - Atari STe 4MB + HxC SD Floppy :: Falcon CT63 @90Mhz 14/128MB + CF2IDE + PS/2 adapter + Hydra Ethernet !
User avatar
Orion_
Captain Atari
Captain Atari
 
Posts: 185
Joined: Sat Jan 10, 2004 12:20 pm
Location: Perpignan

Re: -ST Emulation on Firebee? -

Postby oehansen » Wed Jun 27, 2012 4:34 pm

Klapauzius wrote:FireTOS already has this kind of exception handling for the unimplemented 68k instructions and addressing modes, using the CF68KLib.


If it's in there, it sure ain't working ... they all create "illegal instruction", and "privelege violation" exceptions.

Such grab-ins are quite quick and easy to write, and I'd prefer the kernel having, than having it in user space ...
oehansen
Captain Atari
Captain Atari
 
Posts: 227
Joined: Tue Apr 17, 2012 12:05 pm

Re: -ST Emulation on Firebee? -

Postby Klapauzius » Wed Jun 27, 2012 4:50 pm

There are a few special cases where an 68k instruction doesn't generate an exception, but still behaves differently on the ColdFire CPU.

For example, muls doesn't set the overflow flag in the ccr on the ColdFire.
Move.b dx,-(a7) decrements the stack pointer by one byte only on the ColdFire.
Probably the most problematic ones are the classic LineA calls on TOS - $a000 - $a00f. These are now valid MAC instructions on the ColdFire and don't generate an exception anymore.

All these can't be caught by an exception handler and will have to be patched manually.

Still, in my (short!) experience with the FireBee, many cleanly written 68k applications run just fine under FireTOS or FireTOS+Mint.
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.
User avatar
Klapauzius
The Klaz
The Klaz
 
Posts: 4298
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria

Re: -ST Emulation on Firebee? -

Postby oehansen » Wed Jun 27, 2012 5:14 pm

I agree, most would ... but commands such as "ROR/L" are quite a nuisance that aren't implemented, and a lot of well written code will use them. They are quite common in implementing byte order reversal.

I took a look at cf68klib .... it's far too big to use. I think its a good idea, to change the code in the games.. And I'd also suggest having a "basic" handler, that would do the most needed instructions, like the rotate instructions, EXG, etc. The cf68klib source I read is 665250 bytes, and some 23819 lines. That is way too much ...
oehansen
Captain Atari
Captain Atari
 
Posts: 227
Joined: Tue Apr 17, 2012 12:05 pm

Re: -ST Emulation on Firebee? -

Postby BlankVector » Wed Jun 27, 2012 10:04 pm

oehansen wrote:These instructions create illegal instruction exception, and they can be simulated in machine code.

If I understand correctly, you are complaining that FireTOS does not emulate ROL/ROR instructions.

In that case, you are wrong. FireTOS does emulate them through the CF68KLib.

However, sometimes FireTOS itself crashes and gets lost somewhere while it is in plain ColdFire mode, and messages such as "illegal instruction" are displayed. The original cause of the crash is elsewhere.
BlankVector
Captain Atari
Captain Atari
 
Posts: 158
Joined: Wed Oct 24, 2007 7:52 pm
Location: Paris, France

Re: -ST Emulation on Firebee? -

Postby joska » Thu Jun 28, 2012 12:12 pm

oehansen wrote:I took a look at cf68klib .... it's far too big to use.


It seems to work just fine on the FireBee ;) In what way is it to big?
Jo Even

Firebee - Milan060 - Falcon040 - Falcon030 - FreeMiNT - XaAES - MIST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
joska
Atari God
Atari God
 
Posts: 1834
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway

Re: -ST Emulation on Firebee? -

Postby oehansen » Thu Jun 28, 2012 4:48 pm

joska wrote:It seems to work just fine on the FireBee ;) In what way is it to big?


That code is a monster, way too bloated :-) it "appears" to emulate the XServer code ok.

The original cause of the crash is elsewhere.


ahemm ... cough cough

I have to admire Motorola/Freescale engeneers ... taking out ror/rol, instead of taking out either arithmetic or logical shifts. reading about the "compatibility" between the different versions of 68k, makes me feel like a junkie. if that makes any sense :-)
oehansen
Captain Atari
Captain Atari
 
Posts: 227
Joined: Tue Apr 17, 2012 12:05 pm

Re: -ST Emulation on Firebee? -

Postby joska » Mon Jul 09, 2012 1:24 pm

oehansen wrote:That code is a monster, way too bloated :-) it "appears" to emulate the XServer code ok.


Here's a video of that monster running Arkanoid just fine: http://youtu.be/6B1xjo4VkyM

See http://acp.atari.org/.
Jo Even

Firebee - Milan060 - Falcon040 - Falcon030 - FreeMiNT - XaAES - MIST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
joska
Atari God
Atari God
 
Posts: 1834
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway

Re: -ST Emulation on Firebee? -

Postby BlankVector » Mon Jul 09, 2012 2:17 pm

:mrgreen:
BlankVector
Captain Atari
Captain Atari
 
Posts: 158
Joined: Wed Oct 24, 2007 7:52 pm
Location: Paris, France

Re: -ST Emulation on Firebee? -

Postby Klapauzius » Fri Jul 13, 2012 3:37 pm

I recently got my FireBee, which is really a nice piece of hardware! However, because of the very different architecture of this machine, the current game patches unfortunately can't work on the FireBee.

After some fiddling around and getting lots of help from the nice people at the ACP (special thanks to Mathias and Vincent!), there is now a test version of Arkanoid for the FireBee available! :)

Please keep in mind that this version has to be considered as being in pre-alpha state, so some things don't work 100%, or not at all.

Here are the restrictions:

- USB keyboards and mice won't work in the game. You'll have to use Atari keyboards/mice or connect PS2 devices via an Eiffel interface.
- Some monitors may not support the FireBee's ST low screen resolution, the output timings generated by the FPGA are not 100% yet. If you get a black screen, try to use the VGA input on your LCD monitor by using a DVI->VGA adapter.
- You need to start the game from FireTOS or from Mint. Running the game from EmuTOS won't work, since there is no 68K emulation layer in EmuTOS.
- There will be slight flicker on some of the sprites here and there, due to the VBL interrupt not being synced to the monitor VBL (hard to fix, maybe some day).
- There's another minor bug in the FPGA/Videl that shifts the entire ST low picture down by one halfline. This is hardly noticeable in this game, though.
- Snapshots taken on the FireBee can't be restored on other machines (and vice-versa).

This is not much more than a proof of concept yet. Maybe we'll also see some sort of emulator on the FireBee for running ST games. In any case, there may be more game fixes coming for the FireBee from my side, but there are some issues that have to be solved before that.

This FireBee version should also work on 'normal' Ataris, it's a 'universal binary' ;-)

Get it here:
http://dbug.kicks-ass.net/klaz/Old_Games.html#Arkanoid
(it's the download link to the right)
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.
User avatar
Klapauzius
The Klaz
The Klaz
 
Posts: 4298
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria

Re: -ST Emulation on Firebee? -

Postby jfl » Fri Jul 13, 2012 6:12 pm

Klapauzius wrote:After some fiddling around and getting lots of help from the nice people at the ACP (special thanks to Mathias and Vincent!), there is now a test version of Arkanoid for the FireBee available! :)

Oh Boy. This is insane. I tried it just out of curiosity since I was certain my LCD panel would not handle it but the game works perfectly! With sound and all! It's really amazing to see such an old game run so well on such a new machine. This tells a lot about all the work done by all involved in this project to make this possible. :cheers:
jfl
Atari Super Hero
Atari Super Hero
 
Posts: 619
Joined: Tue Jul 18, 2006 10:55 pm
Location: Belgium

Re: -ST Emulation on Firebee? -

Postby Mathias » Fri Jul 13, 2012 8:54 pm

jfl wrote:Oh Boy. This is insane. I tried it just out of curiosity since I was certain my LCD panel would not handle it but the game works perfectly! With sound and all! It's really amazing to see such an old game run so well on such a new machine. This tells a lot about all the work done by all involved in this project to make this possible. :cheers:
Exactly, and Klapauzius is counting it still as "Alpha" software!! Incredible isn´t it?
8O

If I consider what parts are still missing, it´s much more stunning that it became possible! I hope such insane support of the plattform is going on or even increasing, and a real killer machine will develope if we are all working together!
MegaST 4 with Sounddesigner II MegaBus hardware and 56001, Hades 040, MagiC Mac at Mac OS 9 and a FireBee.
Mathias
Atari Super Hero
Atari Super Hero
 
Posts: 522
Joined: Sat Dec 20, 2008 4:51 pm
Location: Vienna

Re: -ST Emulation on Firebee? -

Postby Klapauzius » Sat Jul 14, 2012 7:49 am

Mathias wrote: Exactly, and Klapauzius is counting it still as "Alpha" software!! Incredible isn´t it?
8O

That's mainly because USB keyboards and mice can't work in the game. I guess many people would like to use a shiny new and smooth USB optical mouse with their FireBee, instead of that old blocky Atari brick. :wink: I would, if I didn't have an optical mouse connected to the ST keybaord via the PeST.

Mathias wrote:If I consider what parts are still missing, it´s much more stunning that it became possible! I hope such insane support of the plattform is going on or even increasing, and a real killer machine will develope if we are all working together!

Yes, I hope so! :)
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.
User avatar
Klapauzius
The Klaz
The Klaz
 
Posts: 4298
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria

Re: -ST Emulation on Firebee? -

Postby Dal » Tue Jul 17, 2012 9:11 pm

Tried running Arkanoid on my Bee and I get this:
Ark_FB_Error.jpg
You do not have the required permissions to view the files attached to this post.
FireBee, Falcon -Soundpool case: CT63@95Mhz + 14MB/512MB + 16GB SSD + FPU + Phantom 25/50 + SuperVidel + SoundPool FDI + FA8 + ADAT + Eiffel, TT030: 4MB/16MB + Crazy Dots, Mega"SST" 12, STbook, STacy 2, MegaSTE, STE: Desktopper case, IDE interface, UltraSatan (8GB + 512Mb) + HXC floppy emulator. Plus some STE's/STFM's
Dal
Administrator
Administrator
 
Posts: 3174
Joined: Tue Jan 18, 2011 12:31 am
Location: Cheltenham, UK

Re: -ST Emulation on Firebee? -

Postby Mathias » Tue Jul 17, 2012 9:17 pm

Two quick ideas:

1) Are you sure you got all the latest "Firemwares" (BaS, FPGA, FireTOS in this case) at your Bee? I know you got yours very early.

2) Did you wait at least 2 minutes after bootup, before you started Arkanoid?
MegaST 4 with Sounddesigner II MegaBus hardware and 56001, Hades 040, MagiC Mac at Mac OS 9 and a FireBee.
Mathias
Atari Super Hero
Atari Super Hero
 
Posts: 522
Joined: Sat Dec 20, 2008 4:51 pm
Location: Vienna

Re: -ST Emulation on Firebee? -

Postby Dal » Tue Jul 17, 2012 10:08 pm

I flashed the firmwares supplied on the CF card I got from Medusa a couple of weeks ago. I assume these are the latest?

I did not wait 2 minutes before trying to run the game. Didn't even know this was something that should be done - what's the reason?
FireBee, Falcon -Soundpool case: CT63@95Mhz + 14MB/512MB + 16GB SSD + FPU + Phantom 25/50 + SuperVidel + SoundPool FDI + FA8 + ADAT + Eiffel, TT030: 4MB/16MB + Crazy Dots, Mega"SST" 12, STbook, STacy 2, MegaSTE, STE: Desktopper case, IDE interface, UltraSatan (8GB + 512Mb) + HXC floppy emulator. Plus some STE's/STFM's
Dal
Administrator
Administrator
 
Posts: 3174
Joined: Tue Jan 18, 2011 12:31 am
Location: Cheltenham, UK

Re: -ST Emulation on Firebee? -

Postby Mathias » Tue Jul 17, 2012 10:29 pm

Dal wrote:I flashed the firmwares supplied on the CF card I got from Medusa a couple of weeks ago. I assume these are the latest?
I hope so :mrgreen:

Dal wrote:I did not wait 2 minutes before trying to run the game. Didn't even know this was something that should be done - what's the reason?
I am not sure if it is still necessary. If so Klaz has to explain it, I didn understand it exactly ;)
But does it work if you wait a little bit?
MegaST 4 with Sounddesigner II MegaBus hardware and 56001, Hades 040, MagiC Mac at Mac OS 9 and a FireBee.
Mathias
Atari Super Hero
Atari Super Hero
 
Posts: 522
Joined: Sat Dec 20, 2008 4:51 pm
Location: Vienna

Re: -ST Emulation on Firebee? -

Postby wongck » Tue Jul 17, 2012 11:18 pm

Mathias wrote: I am not sure if it is still necessary. If so Claus has to explain it, I didn understand it exactly ;)
But does it work if you wait a little bit?


It may be it is the time for you to do the Happy "It will work on my FireBee" dance.
Did you not do that ? :lol:
My Stuff: Falcon CT63+CTPCI ATI R7500 14+512MB 30GB HDD CF HxC_SD EtherNEC/ FB/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
User avatar
wongck
Ultimate Atarian
Ultimate Atarian
 
Posts: 10705
Joined: Sat May 03, 2008 2:09 pm
Location: Far East

Re: -ST Emulation on Firebee? -

Postby Klapauzius » Wed Jul 18, 2012 5:10 am

Dal, I had some issues with the self extracting program file format under FireTOS.
I thought these issues were gone now after changing the cache flushing code in the unpacker. Looks like there still might be something wrong with that.

Anyway, I have attached an unpacked version of Arkanoid to this post. Hopefully this will work for you. :)

PS:the 2 minutes wait should no longer be neccessary. It had to do with PCI drivers accessing the ST RAM shortly after booting or shortly after using the mixer.
You do not have the required permissions to view the files attached to this post.
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.
User avatar
Klapauzius
The Klaz
The Klaz
 
Posts: 4298
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria

Next

Return to FireBee

Who is online

Users browsing this forum: CommonCrawl [Bot] and 1 guest