Overview Features Coding ApolloOS Performance Forum Downloads Products Order Contact

Welcome to the Apollo Forum

This forum is for people interested in the APOLLO CPU.
Please read the forum usage manual.
Please visit our Apollo-Discord Server for support.



All TopicsNewsPerformanceGamesDemosApolloVampireAROSWorkbenchATARIReleases
Information about the Apollo CPU and FPU.

Add Atari Hardware to Vampire

Vincent Rivičre

Posts 87
08 Mar 2017 12:41


We saw that EmuTOS works fine on Vampire, using Amiga hardware. Next obvious step is to add Atari hardware implementation in the Vampire FPGA, to allow more Atari programs to work, including hardware-banging software like games and demos. Gunnar already shown interest to do that.

Some Atari hardware parts are easy to implement, some are not. To get a complete ST in Vampire, the easiest way is to get in touch with people who already implemented full ST in FPGA:
- Wolfgang Förster who created the Suska board
- Till Harbaum who created the MIST board
I'm sure their work could be merged to Vampire (or the opposite), just ask them.

Before getting a full ST in Vampire, I believe it would be *easy* with *minimal* effort to get some simple Atari demos working. The idea is to load such programs with EmuTOS for Amiga, then, just before jumping to the user program, EmuTOS could enable "ST mode" by writing to a new Vampire register.

What needs to be done for minimal ST mode on Vampire:

1) A new register to switch from Amiga to ST mode. Mandatory to cope with different interrupts.

2) Map $00ff0000-$00ffffff to special Atari I/O space in the FPGA. This could even be RAM for first tests, that would be good enough.

3) Map $ffxxxxxx addresses to $00xxxxxx. This is because Atari software accesses I/O space either with $ffxxxx or $ffffxxxx.w. This doesn't matter on a 24-bit address bus, but on 32-bit address buss that matters.

4) Add support for Atari interleaved bitplanes to SAGA. Gunnar told me he had already made tests with that.

5) Add support for ST-Low video mode in SAGA. Virtually all ST games and demos use that mode. It is 320x200, 4 planes (16 colors). Refresh rate is preferably 50 Hz (for European games/demos). Can also be 60 Hz by writing to a register, but not important for first tests.

6) How hardware determines the video base address, let's say $AABBCCDD:
- AA is always 00. Screen buffers can be anywhere in ST-RAM (first 14 MB of address space).
- BB is read from byte $FF8201 (Video base high)
- CC is read from byte $FF8203 (Video base medium)
- DD is always 00 on ST (additional register exists on STe)
Implement the 2 above byte registers (could be simple RAM), then software can set the video address.

7) Implement palette registers
There are 16 WORD registers located at $FF8240.
First word is color 0 (also used for borders), second one is color 1, etc.
Each word uses format $RGB. Range is from $000 (black) to $777 (white), which means 512 possible colors. High bit of each nibble is ignored on ST (only used on STe as additional LSB for 4096 colors).

8) Disable Amiga interrupts. They conflict with Atari ones.

9) Enable Atari VBL interrupt. It is 68000 level 4 interrupt, using vector at $70. It is used by programs for display synchronization.

10) Add minimal stub for YM-2148 soundchip. Virtually all games and demos write directly to it. You don't need to implement the actual chip, just ensure that BYTE writes to $FF8800 and $FF8802 don't produce something bad.

11) Add minimal stub for IKBD (intelligent keyboard). It is the device which handles keybord/mouse/joysticks. Just ensure that BYTE address $FFFC02 can be read, and returns preferably 0 to avoid software think some key is stuck.

The above list is really small, but from the top of my head, I think this should be enough for a first real-world test with simple existing demos. It should be very easy to implement for an experimented VHDL developer. So, Gunnar, go ahead :-)


Vincent Rivičre

Posts 87
08 Mar 2017 12:43


Sorry, I wanted to publish this in "Vampire" section. And now I can't move this topic :-(


Grzegorz Wójcik (pisklak
(Apollo Team Member)
Posts 87
08 Mar 2017 13:17


Thank you Vincent for that list !
It may be small but all depends on how much hard/easy is to do that, despite the fact that we have some real VHDL magicans! Anyway would be  fun to have 'Atari mode'.

PS. I imagine some ppl may have a heart atack with "Atari in Amiga" ;-)




John William

Posts 563
08 Mar 2017 14:38


Grzegorz Wójcik (pisklak wrote:

  PS. I imagine some ppl may have a heart atack with "Atari in Amiga" ;-)

My heart! My heart! * falls to the ground with a large thud *



OneSTone O2o

Posts 159
08 Mar 2017 15:26


I welcome this step! Looking forward how it develops.

I also proposed to Gunnar to have a switch between Amiga and Atari mode. But by hardware, a pin on the FPGA. So only one board must be produced, and by setting a jumper it can be plugged in Amiga or ST.


Ian Parsons

Posts 230
09 Mar 2017 05:16


I doubt a jumper is necessary, the vampire could probably sense if it is plugged into an Amiga or some other hardware e.g. an ST, with a suitable core.


Gunnar von Boehn
(Apollo Team Member)
Posts 6197
09 Mar 2017 10:49


Hi Vincent,

great list.
Thank you very much!

I agree this all can be done easy and straigth forward.

SAGA does support PLANAR formats.
Also ATARI PLANAR format.

We are playing with them and testing them right now.
We wrote test for ATARI 1 Bit and 2 Bit formats.
And they look good. We will also test 4bit now.



Vincent Rivičre

Posts 87
09 Mar 2017 13:45


It looks that EmuTOS for Atari will work very soon on Amiga + Vampire with very little changes :-)


Vincent Rivičre

Posts 87
13 Mar 2017 10:11


Even if some Atari features conflict with Amiga (interrupts, FastRAM address, etc.), the I/O address spaces don't overlap. All Atari I/O are located in the $FF8000-$FFFFFF range (except Falcon IDE located at $F00000). This range is already used by Amiga ROM, but it is not supposed to be written.

As a first step, the Core could just detect writes to Atari I/O addresses, and enable Atari features accordingly.
I.e. as soon as write is issued to $FF8201 or $FF8203, switch to Atari Shifter video modes.


Thierry Atheist

Posts 644
13 Mar 2017 11:53


AMIGA OS can only use 2 Gigs of RAM. How about TOS? What's the maximum amount of RAM usable?


Vincent Rivičre

Posts 87
13 Mar 2017 12:41


Most TOS functions return negative long numbers as error codes. So they would conflict with addresses >= 2 GB. So we can safely assume that TOS memory limit is 2 GB.
Standard RAM is ST-RAM (up to 14 MB), FastRAM is TT-RAM (up to 496 MB on FireBee, could be more). Any other Alt-RAM can also be added.

posts 11