ATOM FPGA

discussion of games, software, hardware & emulators relating to the Acorn Atom and Acorn System machines.
acory
Posts: 20
Joined: Thu Feb 26, 2015 9:47 pm
Location: Cambridge, England
Contact:

Re: ATOM FPGA

Post by acory » Mon Mar 23, 2015 12:07 am

Thanks once again Dave/Hoglet,

I ordered a SD card socket and hooked up the 6 necessary wires, then I found the disk image file and some software to copy the image to a SD card.

-> It worked first time!

Does the FPGA read and write tapes if you add the necessary analogue interface electronics?

--Acory

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Mon Mar 23, 2015 6:38 am

acory wrote:Thanks once again Dave/Hoglet,

I ordered a SD card socket and hooked up the 6 necessary wires, then I found the disk image file and some software to copy the image to a SD card.

-> It worked first time!
=D> =D> =D> =D> =D>
acory wrote:Does the FPGA read and write tapes if you add the necessary analogue interface electronics?
This is not something I have ever tried, but I don't see why it wouldn't work if you replicated the analog bit of the Atom Tape interface. Just make sure the signal feeding into the FPGA is at most 3.3V.

The tape interfaces uses bits 5 and 4 of the 8255 port C.

At the moment, these are fixed at "1":

Code: Select all

    i8255_pc_idata <= vdg_fs_n & key_repeat & "11" & i8255_pc_data (3 downto 0);
Bit 5 would be the output of your analogue circuit fed in through a pin.
Bit 4 needs to be a 2400Hz clock. On the Atom this is 4MHz / 16 / 13 / 8 = 2403Hz. See this thread for more details. This divider could be implemented inside the FPGA.

If this was successful, I might produce a V2 of the Atom Papilio wing that added this, if I can find a spare input.

On a different subject, any progress on taking photos / making WAVs of your tape collection? :D

Dave

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Mon Mar 23, 2015 6:56 am

Acory,

If you do start by creating WAV files of your tapes, there is a Java program here that will do a fairly decent job of extracting the data and creating ATM files that would work with AtoMMC, and also with the Atomulator emulator.
https://github.com/hoglet67/AtomSoftwar ... omwavtoatm

A bit more work would be needed to create disk images that would be compatible with your SDDOS V2, but we have all the pieces to do this.

I say this because if your goal is to extract the old data off your tapes, this might be a more productive path than trying to add the tape interface hardware to AtomFPGA.

By the way, have you tried Atomulator yet?

There are various versions for different OSs:
- Windows link
- Linux link
- OSX link
- Raspberry Pi (called Optima with is an anagram of Atom Pi) link

(I'll need to track down more current links to the linux/windows builds...)

What's your preferred OS?

Dave

acory
Posts: 20
Joined: Thu Feb 26, 2015 9:47 pm
Location: Cambridge, England
Contact:

Re: ATOM FPGA

Post by acory » Tue Mar 24, 2015 11:48 pm

OK Dave,

thanks once again for the advice.

I am sorry to disappoint but my tape collection is almost all personal stuff. I used the Atom for programming (such as the space invaders I never finished) usually in assembler. I have never really played games because I suck at them big time. I was at university when all the latest and greatest arcade machines came out (asteroids, galaxians, etc.) and found out pretty quickly that I was useless. I guess nostalgia makes me want to see what I did when I was younger and perhaps finish the space invaders program.

I do however have one commercial tape, and as far as I could see it wasn't in the list of games on the MMC card, but possibly it is Atari and not Atom. I'll try it out and forward photo and wav if it is Atom. It is called "Galactic Chase" by Spectrum Computers. I do remember playing a galaxians type game on the Atom, so this could be it. Ha! Guess what. It is on YouTube and is Atari. :(

--Acory

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Sun Apr 19, 2015 3:05 pm

Hi all,

This weekend I've been updating the Atom FPGA project to run on my new Papilio Duo hardware:
IMG_0932.JPG
As this is very capable hardware, I thought I would do some tweaking to try to emulate Roland's 2015 edition Atom.

Specifically, this has some nice features like:
- 4 banks of RAM from #4000-#7FFF for general program use
- 8 banks of RAM from #A000-#AFFF for BRAN style paged ROMs
- 1 bank of RAM from #C000-#FFFF for custom operating system development
- control registers for the above at #BFFE and#BFFF
- the latest AtomGodilVideo VGA video adapter

Here's the end result working:
IMG_0948.JPG
Here's it after running Rolands SYSTEM/INIT program:
IMG_0946.JPG
And here's it running BBC/BBC to load an alternative OS:
IMG_0951.JPG
Finally, a close up of the board:
IMG_0950.JPG
The MicroSD card slot is tiny.

I should say, this is running the full AtoMMC stack from a Soft AVR processor in the FPGA. There is a separate ATmega32U4 chip on the Duo which might be able to run this in the future. This has 32K FLASH but only 2.5K of RAM. It's possible the RAM might be a bit tight now we have added Random Access file support to AtoMMC.

Anyway, this is a really cool board, and I'd have no qualms in recommending it for this kind of project.

As always, all the code is in github:
https://github.com/hoglet67/AtomFpga

Dave

User avatar
roland
Posts: 3395
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: ATOM FPGA

Post by roland » Sun Apr 19, 2015 7:44 pm

Amazing :o My complete new Atom already cloned into such a small piece of hardware. But how are you ever going to connect a disk pack :mrgreen:

Just teasing you, you did again a great job =D>
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
sirmorris
Posts: 773
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ATOM FPGA

Post by sirmorris » Mon Apr 20, 2015 9:35 am

:o Wowee!

Looking good - I swore I'd never buy another fpga dev board until I'd used the existing ones properly but ...

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Mon Apr 20, 2015 10:31 am

Charlie,

I started looking last night at implementing AtomMMC in the real ATmega32U4 on this board.

Looks like they might have messed up the wiring a bit :(

Specifically, the MicroSD card signals are wired to the ATmega32U4, but not to the pins that are used by the SPI interface.

Also, only 7 out of the 8 pins in PortD are connected (D5 isn't), so there isn't a complete byte wide port connecting the FPGA and the ATmega32U4.

I've asked on their forums, it will be interesting to see Jack's response - he is usually extremely helpful.

Dave
Last edited by hoglet on Tue Apr 21, 2015 7:04 pm, edited 1 time in total.

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Mon Apr 20, 2015 10:44 pm

Very very interesting Dave !!


Did you intend on adding SDRAM support as well -;) ....

Grx...

Eric

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Tue Apr 21, 2015 6:51 am

eric wrote: Did you intend on adding SDRAM support as well -;) ....
Seriously, I'd love to try this, but I don't have any hardware that uses SDRAM.

If anyone knows of a Papilio Pro going cheap....

Did you get any further with this?

Dave

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Tue Apr 21, 2015 7:07 am

Eric,

I went back and read your last post...
eric wrote:I have been cheering too soon .. The basic RAM test from the archive succesfully tested the sdram at 1-2 and 4 Mhz (at least that is something ... ) ... but quicker things such as you described with fast instructions still go wrong ... and are still not reliable .. also chuckie egg and the software archive full listing crash ..

back to the drawing board ... most sadly ..
I also had a reliability problem with the SRAM on the Duo. Initially things seemed to work (i.e. the Atom would boot), and basic programs would run fine, memory tests pass, etc. I could sometimes even run the AtomMMC Menu. But most "real" machine code programs would fail with random errors.

I was chasing my tail with this for almost a day, and then I recalled some of the issues we had with the LX9 Co Pro and noise problems when too many outputs switched as the same time.

So in the UCF file I added:
| DRIVE = 2 | SLEW = SLOW
to all of the outputs, and that completely resolved the issue.

It might just be worth you trying something similar.

Dave

User avatar
BCCweirdo
Posts: 73
Joined: Sat Feb 14, 2015 9:01 pm
Contact:

Re: ATOM FPGA

Post by BCCweirdo » Tue Apr 21, 2015 3:41 pm

sirmorris wrote::o Wowee!

Looking good - I swore I'd never buy another fpga dev board until I'd used the existing ones properly but ...
I thought the very same thing before discovering about the DUO :D

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Wed Apr 29, 2015 8:33 pm

Hi Dave,
So in the UCF file I added:
| DRIVE = 2 | SLEW = SLOW
to all of the outputs, and that completely resolved the issue.
I tried it Dave... to all the pins of the SDRam chip .. Same result .. i must be doing something else wrong ..

Grx..

Eric

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Sat Aug 01, 2015 5:00 pm

Hi,

I just ordered a spartan 6 LX45 board it roughly has 4 times the internal capacity of the LX9 .. I started porting the atom FPGA project to it .. the idea is to put as much as possible in the FPGA. RAM, ROM, MMC stack, to create a full fledged atom in a supersmall size with as little external hardware as possible ... probalby only connectors to hook up keyboard, mouse, vga, sound, SD, I/O (maybe PL6/7 in 3V or converted to 5V to match the old bus)

http://numato.com/fpga-boards/xilinx/sp ... sdram.html

Any idea's ?

Grx..

Eric

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Sun Aug 02, 2015 10:21 am

Good luck with this endeavour.

Are you planning to make a "wing" for this that has the VGA connector (and ladder DAC), PS/2 connector, SD Card, etc? Or is there something off-the-shelf that you can use?

Dave

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Sun Aug 02, 2015 1:16 pm

Hi Dave,

I intend to build a mini wing soldered out of copper wires like transformer wire .. just fitting in the inner rows of the connectors if possible .. so the rest is still free for other future plans ..
But at first i will start with a breadboard next to the board to see if i have chosen the correct pins for each function and get it from "loose wires" working before i think about soldering or board design .. There is still a lot to investigate .. and i have not made up my mind yet what signals to bring out of the FPGA or not in this stage .. the first go will be to see if i can get the full atom pack as you and Alan designed tailored to this type of chip. From there the next steps on the path will be open .. many things to choose .. i wanted more I/O for I2C and more SPI devices.. and maybe the full bus with some extra select lines ..

I was also brainstorming with the idea to replace my processor card in my original Atom with an FPGA card. This to take care of the processor, godil, sound, keyboard, mouse, system roms and ram. But the bring up the address lines, R/nW, Phi2, to 5V with npn transistors (and easily negate the outputs in the FPGA) and use FETS for the bidirectional databus. So that it will hopefully talk with my existing hardware in the rack over the standard ATOM bus.. Midi port, speech synth, z80 card through extra VIA, eprom programmer (hmm will i still use that in the future ?? still feels like a waste to lose it ) ..

It would mean a brain transplant for my old lady ...

I look forward to setting my teeth in this board .. i am still not over the SDRAM nightmare .. a nice example of me jumping to far in the deep too soon ...

Grx...
Eric

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Thu Aug 13, 2015 3:10 pm

Hi All,

Got the 1st configuration running in the LX45.. Looking good .. SDROM still.. but running the archive, SID, hw scrolling, chuckie egg....
got 16 RAM boxes on #A now and RAM under all the sysroms...

I abused the arcade megawing that i have for the papilio with dupont cables so then easy to test and assign pin numbers to everything ..

now on to the next adventure MMC + bran in #E .. adding PL8 and the AVR core
I still have the old dutch acorn club standard for the block #A switch byte but i had in the past extra switch options with #BFFE, #BFFD and #BFFC .. is there any kind of standard in this ?

in PIC3 you see the cold boot some screen errors since i switched on the softchar option ... anybody seen that before ? after one reset the screen is normal ..

Grx..
Eric
Attachments
FullSizeRender5.jpg
pic3
FullSizeRender4.jpg
pic2
FullSizeRender3.jpg
pic

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Thu Aug 13, 2015 3:20 pm

eric wrote:Hin PIC3 you see the cold boot some screen errors since i switched on the softchar option ... anybody seen that before ? after one reset the screen is normal ..
I have but I don't remember exactly when/where.

I think it's caused by unreliable reads from screen memory, so anywhere the cursor travels gets corrupted.Edit: No it's not - see Kees's post below.

Dave
Last edited by hoglet on Thu Aug 13, 2015 3:33 pm, edited 1 time in total.

User avatar
oss003
Posts: 3098
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: ATOM FPGA

Post by oss003 » Thu Aug 13, 2015 3:24 pm

Looks more like an enabled hardware mousepointer.
I had this on my real Atom.

Greetings
Kees

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Thu Aug 13, 2015 3:32 pm

oss003 wrote:Looks more like an enabled hardware mousepointer.
I had this on my real Atom.
Yes, listen to what that man says!!!!!

It's caused if the AtomGodilVideo component does not receive a power up reset pulse. In this state the default pointer is enabled. Try plugging a mouse in and you'll find you can make the "corruption" move around.

Dave

User avatar
roland
Posts: 3395
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: ATOM FPGA

Post by roland » Thu Aug 13, 2015 4:18 pm

eric wrote: I still have the old dutch acorn club standard for the block #A switch byte but i had in the past extra switch options with #BFFE, #BFFD and #BFFC .. is there any kind of standard in this ?
AFAIK there is not a real standard. In my new Atom I use #BFFE for these purposes:

#BFFE: bits 0 and 1 select the 16 kB bank at #4000 - #7FFF
#BFFE: bit 2: 0 -> OS runs in EPROM, 1 -> OS runs from RAM
#BFFE: bit 3 selects on the the two banks of the EPROM
#BFFE: bit 6 selects clock speed (0 -> 1 MHz, 1 -> 2 MHz)
#BFFE: bit 7 selects write protect (0-> write protect off, 1 -> write protect on)

The write protect goes for all the utility rom banks at #Axxx and the OS RAM from #C000-#FFFF.

Bit 4 of #BFFE is also used by the software for some reset routine trick to restart BBC Basic after a <break>.
256K + 6502 Inside
MAN WOMAN :shock:

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Thu Aug 13, 2015 4:50 pm

Ok ... understood ..

So i can make up my own standard ... for switchbytes .. well i have some more /o plans with I2C and SPI devices ... they can be planned in there too .. #bfxx ...

Hmm .. hardware mouse pointer .. i never had a running mouse in the atom .. and indeed that one has been switched on too in the vhdl code..
I did not find the test software yet in the archive .. a lot to read and search.. i never used the windows thingy ... on the atom .. so i do not know yet if my mouse interface is working yet if i move it .. nothing changes .. but my wiring still could be wrong too .. also the connection to the uart must be done still ..

what does the rom software load utlilty form the archive need to work .. ? now it always sees Ax as read only ..



Grx..

Eric

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Thu Aug 13, 2015 6:00 pm

Eric,

I would say that BFFF is the standard address of the A000 ROM latch:
- In a real Atom and with an original Schakelkaart ROM board
- In a real Atom and with Phill's ROM board
- In Roland's New Atom
- In AtomFPGA

The use of BFFE is not really standardized, but I would stick to BFFF for the ROM Latch.

I think all the Atom Menu System ROM Loader needs is the ROM Latch at BFFF.

Dave

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Thu Aug 13, 2015 6:07 pm

Hi Dave,

That one is also a standard burned into my fingers .. i will keep the AX block switch safe at BFFF ...

(also to not put myself next to the sideline by going too far away from things that have sort of become standard through the years ..)

Grx..

Eric

User avatar
oss003
Posts: 3098
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: ATOM FPGA

Post by oss003 » Thu Aug 13, 2015 7:38 pm

Hi Eric,

you can disable the hardware mousepointer by typing ?#BDEA=128 (if you decoded address #BDEA of course)
This info comes from hoglets Godil Wiki at: https://github.com/hoglet67/AtomGodilVi ... escription
mousepointer.png
Greetings
Kees

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Thu Aug 13, 2015 7:46 pm

oss003 wrote:Hi Eric,

you can disable the hardware mousepointer by typing ?#BDEA=128 (if you decoded address #BDEA of course)
This info comes from hoglets Godil Wiki at: https://github.com/hoglet67/AtomGodilVi ... escription
mousepointer.png
Greetings
Kees
A reset should do this as well.

I ought to update the VHDL so that the initial state of the register, even if there is no reset pulse, is 80 rather than 00. I think setting an initial value in VHDL is possible, it's just not something I routinely do.

Dave

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Fri Aug 14, 2015 4:23 pm

Hi All,

Got the uart now working too ..
The screen corruption indeed was/is the hardware mouse pointer .. when poking #80 to #BDEA it is gone or a reset .. exactly as you guys predicted.. .. but it does not move when hooked up the mouse .. i looked up the pinning and all should be ok, I did not change the godil module.. out of compatibility reasons .., followed the clock and data signal through till the end in the vhdl .. mouse gets 5V .. .. not know what to load to test it .. any hints ?

Grx..

Eric

User avatar
oss003
Posts: 3098
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: ATOM FPGA

Post by oss003 » Sat Aug 15, 2015 2:37 pm

Hi Eric,

you can test the mouse movements by typing:

Code: Select all

P.?#BDE8,?#BDE9$13;U.0
The mouse X- and Y-pos are printed on the screen now and should change if you move the mouse.

Greetings
Kees

eric
Posts: 102
Joined: Mon Apr 21, 2014 1:12 pm
Contact:

Re: ATOM FPGA

Post by eric » Mon Aug 17, 2015 7:20 pm

Thanks Kees,

Following your advice, I used that ... also tried the mouse box ..
I think i have a vhdl or hardware problem somewhere ..
I exchanged the mouse and keyboard port in the ucf and connected the keyboard and mouse accordingly .. but still no mouse and keyboard is OK ..

at this moment i can only think of something wrong in the vhdl .. i thought i used the whole godil module unchanged from Dave's repo.. but will start comparing with the original to exclude implemented mistakes from my side ..

Grx...

Eric

User avatar
hoglet
Posts: 8551
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Mon Aug 17, 2015 7:31 pm

Eric,

A bit of a long shot, but....

It might be worth trying pull-ups on the mouse PS/2 clock and data lines, as these are typically open collector.

You should be able to enable these in the Xilinx UCF file:

Code: Select all

NET ps2_mouse_clk   LOC="P74"  | IOSTANDARD=LVTTL | PULLUP ;             # D8
NET ps2_mouse_data  LOC="P66"  | IOSTANDARD=LVTTL | PULLUP ;             # D9
Maybe you have this already.

Dave

Post Reply