ATOM FPGA

discussion of games, software, hardware & emulators relating to the Acorn Atom and Acorn System machines.
User avatar
hoglet
Posts: 8554
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: ATOM FPGA

Post by hoglet » Sat Nov 14, 2015 8:22 am

PhilYoung wrote: The suggested solutions (which I tried as far as possible) that I can remember were:
...
change the output current capacity of those lines down from 20mA to 4mA - not sure if I tried this.
...
This seems to be the leading candidate for fixing this, see:
http://www.alteraforum.com/forum/showthread.php?t=47474

Interestingly, it was also what I did to improve reliability of the Matchbox board. I wonder if the decoupling is marginal for the new part.

Dave

PhilYoung
Posts: 202
Joined: Sun Jun 12, 2011 4:55 pm
Contact:

Re: ATOM FPGA

Post by PhilYoung » Sat Nov 14, 2015 8:41 am

hoglet wrote:
PhilYoung wrote: The suggested solutions (which I tried as far as possible) that I can remember were:
...
change the output current capacity of those lines down from 20mA to 4mA - not sure if I tried this.
...
This seems to be the leading candidate for fixing this, see:
http://www.alteraforum.com/forum/showthread.php?t=47474

Interestingly, it was also what I did to improve reliability of the Matchbox board. I wonder if the decoupling is marginal for the new part.

Dave
On second thoughts I can't have tried this setting since it only seems to have been suggested recently. Perhaps I'll have another go along with the impedance setting which did improve things somewhat.

I'm (selfishly) hoping you get a DE1 with the 'bad' SRAM, if anyone can get it going it should be you going from past experience....

Cheers,

Phil Young

grannyg
Posts: 42
Joined: Tue Sep 10, 2013 3:06 pm
Contact:

Re: ATOM FPGA

Post by grannyg » Sun Nov 22, 2015 11:30 am

When at the prompt I get the letter Q appearing every couple of seconds. It doesn't seem to affect running the Atom Software Archive.

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

Re: ATOM FPGA

Post by hoglet » Sun Nov 22, 2015 11:46 am

grannyg wrote:When at the prompt I get the letter Q appearing every couple of seconds. It doesn't seem to affect running the Atom Software Archive.
I have a recollection that's something to do with the way the joystick is implemented.

You don't have anything connected to the Joystick ports do you?

Dave

grannyg
Posts: 42
Joined: Tue Sep 10, 2013 3:06 pm
Contact:

Re: ATOM FPGA

Post by grannyg » Sun Nov 22, 2015 12:18 pm

hoglet wrote: You don't have anything connected to the Joystick ports do you?
I've not got anything plugged into either joystick port.

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

Re: ATOM FPGA

Post by hoglet » Sun Nov 22, 2015 12:36 pm

grannyg wrote:
hoglet wrote: You don't have anything connected to the Joystick ports do you?
I've not got anything plugged into either joystick port.
Are you using the checked in .bit file?
https://github.com/hoglet67/AtomFpga/bl ... op_duo.bit
Or one you have built yourself?

If the latter, can you upload it here and I'll try it on my hardware.

Dave

grannyg
Posts: 42
Joined: Tue Sep 10, 2013 3:06 pm
Contact:

Re: ATOM FPGA

Post by grannyg » Sun Nov 22, 2015 12:41 pm

hoglet wrote: Are you using the checked in .bit file?
https://github.com/hoglet67/AtomFpga/bl ... op_duo.bit
I'm using the checked in Atomic_top_duo.bit.

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

Re: ATOM FPGA

Post by hoglet » Sun Nov 22, 2015 1:15 pm

grannyg wrote:
hoglet wrote: Are you using the checked in .bit file?
https://github.com/hoglet67/AtomFpga/bl ... op_duo.bit
I'm using the checked in Atomic_top_duo.bit.
Hmmm.....

Do you still get this if you unplug the keyboard?

Are you able to build this yourself?

If so, try changing this bit of keyboard.vhd from:

Code: Select all

    process(keys, ROW)
    begin
        key_data <= keys(conv_integer(ROW(3 downto 0)));
        -- 0 U R D L F
        if (ROW = "0000") then
            KEYOUT <= key_data(5 downto 0) and
                ('1' & Joystick1(0) & Joystick1(3) & Joystick1(1) & Joystick1(2) & Joystick1(5));
        elsif (ROW = "0001") then
            KEYOUT <= key_data(5 downto 0) and
                ('1' & Joystick2(0) & Joystick2(3) & Joystick2(1) & Joystick2(2) & Joystick2(5));
        else
            KEYOUT <= key_data(5 downto 0);
        end if;
    end process;
to

Code: Select all

    process(keys, ROW)
    begin
        key_data <= keys(conv_integer(ROW(3 downto 0)));
        KEYOUT <= key_data(5 downto 0);
    end process;
Dave

grannyg
Posts: 42
Joined: Tue Sep 10, 2013 3:06 pm
Contact:

Re: ATOM FPGA

Post by grannyg » Sun Nov 22, 2015 2:32 pm

hoglet wrote:Do you still get this if you unplug the keyboard?
Still the repeating Q's with the keyboard unplugged.

If so, try changing this bit of keyboard.vhd from:
After changing keyboard.vhd the repeating Q's are gone. Thanks. :D

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

Re: ATOM FPGA

Post by hoglet » Sun Nov 22, 2015 2:54 pm

grannyg wrote:
hoglet wrote:Do you still get this if you unplug the keyboard?
Still the repeating Q's with the keyboard unplugged.

If so, try changing this bit of keyboard.vhd from:
After changing keyboard.vhd the repeating Q's are gone. Thanks. :D
I wonder if there is a fault on your Classic Computing Shield then?

The only think that would cause Qs to appear like that is if signal Joystick1(0) (pin 1) was being intermittently pulled low, or affected by noise. There is meant to be a pullup resistor on the board. Maybe your's is missing.

You could add pullups to the joystick1 signals in the UCF file and see if that makes a difference.

Dave

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

Re: ATOM FPGA

Post by hoglet » Wed Jul 06, 2016 5:52 pm

Hi Guys,

The last couple of days I have been doing some housekeeping on Atom FPGA:
- re-organized source file structure to accommodate different FPGA families (i.e. Altera and Xilinx)
- updated 6522 with latest code (from BeebFpga)
- updated AVR8 with latest code (from BeebFpga)
- updated Papilio Duo and Olimex targets to use SPI Flash->SRAM bootstrap (this frees up block RAMs in the FPGA)
- pushed AtomMMC implementation down into AtomFpgaCore to allow it to be reused across different targets
- pushed RamRom implementation down into AtomFpgaCore to allow it to be reused across different targets
- support multiple RamRom implementations (None, Phill, Atom2015, SchakelKaart) - this needs a bit more work
- added support for Altera DE1 target

Adding the Altera DE1 target was my original goal in this exercise. It's working, but I had to use SDDOS rather than AtoMMC as there's not enough block RAMs in the Altera 2C20 to fit the current AtoMMC firmware. I might see if it's possible to run this from external memory, but that will take a bit of work.

It anyone with an Altera DE1 want to give this a go, let me know and I'll flesh out some more details on:
- building the AtomFpga .sof file
- programming the SchakelKaart firmware image into DE1 FLASH (at 0x100000)
- installing the SDDOS version of the Atom Software Archive onto SD Card

Dave

PhilYoung
Posts: 202
Joined: Sun Jun 12, 2011 4:55 pm
Contact:

Re: ATOM FPGA

Post by PhilYoung » Wed Jul 06, 2016 9:08 pm

hoglet wrote:Hi Guys,

It anyone with an Altera DE1 want to give this a go, let me know and I'll flesh out some more details on:
- building the AtomFpga .sof file
- programming the SchakelKaart firmware image into DE1 FLASH (at 0x100000)
- installing the SDDOS version of the Atom Software Archive onto SD Card

Dave
Hi,

I'd be up for that, I won't be able to try it for a few days though. Mine is the 'bad' SRAM version of the DE1 if that makes any difference.

Cheers,

Phil Young

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

Re: ATOM FPGA

Post by hoglet » Sat Jul 09, 2016 9:18 am

Hi Phil,
PhilYoung wrote: I'd be up for that, I won't be able to try it for a few days though. Mine is the 'bad' SRAM version of the DE1 if that makes any difference.
The RAM accesses are very slow, so this would work fine on all versions of the DE1 board.

These are all the files you should need:
AtomFpga_AlteraDE1_20160709.zip
(2.87 MiB) Downloaded 45 times

Code: Select all

Archive:  AtomFpga_AlteraDE1_20160709.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
104771584  2016-07-09 10:09   archive.img
   476073  2016-07-06 18:21   AtomFpga_AlteraDE1.sof
    65536  2016-07-09 10:07   schakelkaart.rom
   524508  2016-07-06 18:21   AtomFpga_AlteraDE1.pof
---------                     -------
105837701                     4 files
The .pof and .sof files are the Altera FPGA Design. Program those in the usual way.

The schakelkaart.rom file should be programmed into DE1 FLASH at address 0x100000. This can co-exist with any BeebFpga or ElectronFpga images you have.

The archive.img file is the latest version of the Atom Software Archive in SDDOS format. This should be written directly to blank SD Card using Win32DiskImage or dd on Linux. With SDDOS there is no FAT file system, it's simply a concatenation of 100K disk images. So you won't be able to read the card at all on a modern PC. Ideally use a small (<2GB) SD Card, because I'm not sure SDDOS is compatible with larger SDHC cards.

Dave

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

Re: ATOM FPGA

Post by hoglet » Tue Jul 19, 2016 6:58 am

Hi Keith,
Keith wrote:I would like to add an SD card interface to my own Atom design, and saw existing designs that used a PIC as a slave doing the bit-bashing. I'm not going to stuff another micro in my packed FPGA so I looked for alternatives, preferably ones with software so I don't have to write it.

I also have 'implement a BBC micro' on my to-do list, and that will have the same requirement. I found and bought this product:
http://www.ebay.co.uk/itm/Acorn-BBC-Mic ... 4aca2507b5

It is much faster than other designs, and I bought it to analyse the circuit so I could implement in my FPGA. I recall it is simple but allows the 6502 to avoid the software burden of much bit reading and writing. It is no problem to use the binary data in a BBC-in-FPGA, but to port it to an Atom design I would have to disassemble the ROM image to see what it was doing. Which in turn means I would need to understand the MMC protocol (which I do not).

Charlie Robson and Kees van Oss have already interfaced the SD card, so they might be able to see how the BBC MMC software and hardware is being clever and know how to take advantage of it.

I could have a go at disassembling the BBC MMC code, but this would do little more than split data from code. There would be no meaningful names to say what is going on, nor comments.
I know it's three years later, and I'm not sure why I missed your original post. Sorry about that.

The current version of this Atom FPGA (which is evolved from AlanD's VHDL code) recently got refactored to make supporting new boards easier, and has lots of configurable options:

Code: Select all

entity AtomFpga_Core is
    generic (
       CImplSDDOS              : boolean;
       CImplAtoMMC2            : boolean;
       CImplGraphicsExt        : boolean;
       CImplSoftChar           : boolean;
       CImplSID                : boolean;
       CImplVGA80x40           : boolean;
       CImplHWScrolling        : boolean;
       CImplMouse              : boolean;
       CImplUart               : boolean;
       CImplDoubleVideo        : boolean;
       CImplRamRomNone         : boolean;
       CImplRamRomPhill        : boolean;
       CImplRamRomAtom2015     : boolean;
       CImplRamRomSchakelKaart : boolean;
       MainClockSpeed          : integer;
       DefaultBaud             : integer
    );
There are two different SD Card solutions (the first to settings) available, with mature software:
- AtoMMC uses an AVR8 soft core, running the same firmware Charlie's PIC AtoMMC runs, and supporting a FAT file system.
- SDDOS uses a 6522 to bit-bang the SPI protocol, which supports ~1000 100K disk images

The Atom Software Archive can be compiled to support either of these targets.

You are welcome to pull any/all of this into your own Atom in FPGA work.

I should say that this and your vision for Polymorph provided me with a lot of inspiration of what might be possible in FPGAs. I do hope at some point you decide to release the source code for you Atom-in-FPGA. Even if you consider it unfinished (aren't all projects?) it's of great historical significance as one of the earliest FPGA computer re-implementations.

I hope you can drop into the Cambridge meeting in August. It would be nice to meet you.

Dave

janrinze
Posts: 87
Joined: Sat Mar 19, 2016 6:38 am
Contact:

Re: ATOM FPGA

Post by janrinze » Tue Aug 09, 2016 11:13 am

I started a very simplistic Acorn Atom in FPGA for the HX8K breakout board.

The first attempt can be seen at: https://github.com/janrinze/miniatom

It's not working yet since I am still figuring out how to get the cpu interfaced properly.
Also the vga-out will need more work to get actual screen working.
This is not a copy of other Atom FPGA efforts but an attempt to make a very minimal working ATOM on a small FPGA.

The HX8K has 7680 4LUT's and 16 KB BRAM.
8 KB is used for ROM (BASIC and Kernel)
6 KB for video #8000-#9800
1 KB ZP
1 KB at #9800-#99FF which will hold the character set for the VGA

It is far from finished but I think sharing is the right thing to do at this point :-)

Best regards,
Jan Rinze.

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

Re: ATOM FPGA

Post by acory » Sun Oct 16, 2016 12:31 am

For nostalgias sake I want to read some of my old Atom tapes which contain my own source code.
I no longer have an Atom. I kept it for many many years. It was well kitted out with 32k expansion and the colour board (not that it ever gave great colours!). I don't even recall getting rid of it, and I don't think that I sold it. I remember where it was stored, but I just don't remember throwing it out (ouch!).

Some time ago I loaded Hoglets FPGA code onto a Papilio One. I wired up a SD card and it worked straight away. Props to Hoglet.

So I downloaded the latest source from Github and tried to refresh my memory about using Xilinx ISE. I wanted a vanilla Atom, so I stripped out all the AVR and MMC support stuff and the fpgautils ROM. Connecting to a VGA the ATOM clearly was booting but there was still the SDDROM message. I figured out that I had to remove the ROM at a000. Now it booted with only the Acorn Atom text, but no prompt.

There were lots of timing exceptions and I have no idea which are fatal. I tried hacking the code down more to get rid of stuff that I don't want, and to try to fix or get rid of some of the compilation warnings. Unfortunately now when I load the FPGA I just get a screen of @s. There are still lots of timing exceptions, and I have no idea whether these might be the cause or whether I have removed some important code.

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

Re: ATOM FPGA

Post by hoglet » Sun Oct 16, 2016 6:45 am

Hi George,

(It is George that I met in Cambridge, isn't it?)
acory wrote: So I downloaded the latest source from Github and tried to refresh my memory about using Xilinx ISE. I wanted a vanilla Atom, so I stripped out all the AVR and MMC support stuff and the fpgautils ROM. Connecting to a VGA the ATOM clearly was booting but there was still the SDDROM message. I figured out that I had to remove the ROM at a000. Now it booted with only the Acorn Atom text, but no prompt.
Which project (.xise) file did you start with?

There is one specifcally for the Papilio One:
https://github.com/hoglet67/AtomFpga/bl ... ioOne.xise

which uses this top level VHDL:
https://github.com/hoglet67/AtomFpga/bl ... lioOne.vhd

This already excludes lots of things (including the AVR) and uses the older (and simpler) SDROM 2 based MMC interface.

Did that not work out of the box?

It should have, but I did some refactoring a few months (when I added Altera support), so it's possible I broke something.

Dave
Last edited by hoglet on Sun Oct 16, 2016 9:22 am, edited 1 time in total.

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

Re: ATOM FPGA

Post by hoglet » Sun Oct 16, 2016 9:21 am

hoglet wrote: Did that not work out of the box?

It should have, but I did some refactoring a few months (when I added Altera support), so it's possible I broke something.
Oops, no it didn't! :oops:

I had neglected up update the project file and rebuild following that bout of refactoring.

That's all fixed now:
https://github.com/hoglet67/AtomFpga/co ... a07239ca1f

I've also added a correct set of timings constraints, so you should now see that timing is being met.

I've just tested this, and it works on my Papilio One, and I was able to runs programs of the SD Card using SDDOS 2.

Dave

PS, If your goal for this is to recover your old tapes, I would start by making WAV files of each of them. That way you are protected if the tape breaks. But to get AtomFpga reading tapes there is a fair bit of analogue circuitry you would need to replicate from the Atom. I have never tried this.

A couple of years ago I wrote some Java that does a very decent job of recovering data from Atom tape WAV files. I'm be happy to do this, or alternatively you can try yourself if you are familiar with compiling and running Java programs:
https://github.com/hoglet67/AtomSoftwar ... omwavtoatm

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

Re: ATOM FPGA

Post by acory » Tue Oct 18, 2016 10:23 pm

Thanks Dave/Hoglet (which do you prefer?),

name here is Gary. Nice to have met you and spoken to you at the Cambridge meet. If I still lived in Bristol I would have been happy to buy you a drink for the great FPGA work you have being doing!

Thanks for looking into this for me, I will download the new code and try again.

One of the problems is that I constantly change my mind. I have a nice old keyboard, bought for a fiver, which could be hacked into an Atom Keyboard. So I first had the idea of building an minimal Atom from 6502, 8255, RAM, ROM, Godil (for VGA video), and this keyboard. I have all the chips, entered the schematic into Kicad, but got cold feet at the amount of work. I found my old Altera FPGA board, and considered using this, but it doesn't have enough RAM. I have the Papilio One and shield with VGA, so decided to use this (and P/S2 keyboard) and for now just re-focus on getting the cassette interface working. Building the analogue circuitry isn't a problem.

I was surprised that the Atom divides down from the 4MHz xtal to 2.4kHz which is used as a reference tone for the cassette interface. It also uses 2 pins for output. To me it seems a bit over engineered, and they could have saved some chips if they had only used one I/O for cassette in and one I/O for cassette out and just used software timings. As it stands I think that the interface and code would still work if the 6502 were to be clocked at 2MHz. So really the only modification to the FPGA code is to implement a divider (or DCM?) to give 2.4kHz.

Thanks for the JAVA code pointer, another language I know nothing about :lol: , I'll give this a go too.

--Gary

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

Re: ATOM FPGA

Post by acory » Tue Oct 18, 2016 10:58 pm

Hi Dave,

the changes you made worked a treat. The source code now compiles with no timing errors and the screen display is working correctly. There is something going on with SDDOS, and I do have an SD card connected left from my previous experimentation some months ago, when it was working. No matter I can hit F10 or RESET and get into Basic. The pre-compiled bit file also works OK, but I was interested to see how smoothly compilation would go, and it compiled first time! Neat.


--Gary

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

Re: ATOM FPGA

Post by hoglet » Wed Oct 19, 2016 6:10 am

acory wrote: name here is Gary. Nice to have met you and spoken to you at the Cambridge meet.
Well I remembered the G correctly, sorry about that. :oops:
acory wrote: One of the problems is that I constantly change my mind. I have a nice old keyboard, bought for a fiver, which could be hacked into an Atom Keyboard. So I first had the idea of building an minimal Atom from 6502, 8255, RAM, ROM, Godil (for VGA video), and this keyboard. I have all the chips, entered the schematic into Kicad, but got cold feet at the amount of work. I found my old Altera FPGA board, and considered using this, but it doesn't have enough RAM. I have the Papilio One and shield with VGA, so decided to use this (and P/S2 keyboard) and for now just re-focus on getting the cassette interface working. Building the analogue circuitry isn't a problem.
Another option might be to use Atom FPGA, but target the GODIL, and that would just benefit from a single external RAM (ideally 128Kx8)

What size GODIL do you have?

The limiting factor would be GODIL pins, but there might just about be enough.
acory wrote: the changes you made worked a treat. The source code now compiles with no timing errors and the screen display is working correctly. There is something going on with SDDOS, and I do have an SD card connected left from my previous experimentation some months ago, when it was working. No matter I can hit F10 or RESET and get into Basic. The pre-compiled bit file also works OK, but I was interested to see how smoothly compilation would go, and it compiled first time! Neat.
Can you be more specific about the problem with SDDOS? What error do you see on the screen?

If the pre-compiled bitstream has the same problem, and the card previously worked for you (and hasn't been changed since), that only leaves the interface wiring doesn't it?

Dave

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

Re: ATOM FPGA

Post by acory » Fri Oct 21, 2016 12:01 am

Hi Dave,

sorry I wasn't clear. I don't have a genuine Godel, but I was going to use the Papilio with the Godil software. Of course I would need 5V/3.3V buffers, so more wiring. Enough to put me off ... for the time being.

Anyway, small steps, but I have added code to generate a 2.4kHz signal on the 8255 port C pin, and a scope confirms I got this right. I used one of the library binary counters rather than coding in VHDL, and it took me some time to get the thing to compile. In the end it appears that I have to add the xco to the project and not just the vhd. More experiments tomorrow.

The SD card is now working again. It was just after loading the FPGA there is a spurious message. After a hard reset, and typing *menu, there it was. Key mappings are confusing me, so I think I will re-map them to the P/S2 keyboard. The "Atom" is remarkably unresponsive to fast key strokes, and clearly in the past 35 years :shock: I have learned to type a whole lot faster.

--Gary

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

Re: ATOM FPGA

Post by acory » Mon Oct 31, 2016 11:38 pm

I have continued to modify Hoglets VHDL code top add support for cassette tape. I have also modified the keyboard code so that the characters match the PC keyboard, as I was getting fed up of having to remember where the equivalent Atom key was :) .

I had a strange problem with the cassette VHDL code. I created the same logic as on the Atom (simple NAND logic), but I wasn't getting anything on the pin of the Papilio arcade wing. So I routed a number of debug signals to the LEDs, including the cassette out, and there it was. I modifed the code to assign the output of the logic to a signal and then to the port, and this seemed to fix the problem, although I'd really like to understand where the problem was. On my scope the digital cassette output looked very much as I might expect, two different frequency square waves.

I built the analogue circuitry on a plug in breadboard. It took around 10 minutes to find the parts and build. It took 15 minutes to find my old cassette player (in the last place it could have been)! It was a little dusty. I was able to play an old Atom tape and adjust the volume while monitoring the output of the cassette input circuit (simple Op-Amp) on my scope. I was actually quite impressed at the integrity of the signal, once I adjusted the volume.

I tried to use "*LOAD", but SDDOS got in the way and my guess of "*TAPE" didn't work. I tried to re-compile with no SDDOS ROM, but then I got the "Acorn Atom" sign on string but no prompt. Many years ago I did blow a ROM for 0xA000, so there must be some way that the Atom OS decides if there is something there or not, but I can't remember. So I added the SDDOS ROM back in and re-compiled.

I was able to use the simple tape check code from "Atomic Theory". The first cassette tape was a problem as it stalled. I guess that the rubbers are old and smooth. I tried roughing them up but it still didn't work. So I tried another random TDK cassette. To my suprise there was audio, the guy who used to present Film 19XX (can't remember his name, and I didn't like him anyway). It was a recording from radio I assume of one of the BBC transmissions of computer programs over the air. It sounded similar, but more screechy than the Atom. I think that you had to have special software for your computer to decode it. Anyway I found a blank space further on and recorded a stream of X's. I then ran the code which reads them back with BGET, and I got a stream of X's on the screen of the Atom. Neat. So tape I/O appears to be working.

So how do I temporarily disable SDDOS so that I can use "*LOAD" to load from cassette?

--Gary

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

Re: ATOM FPGA

Post by hoglet » Tue Nov 01, 2016 7:02 am

Hi Gary,
It's great to see you make some progress on the tape side.
acory wrote: I had a strange problem with the cassette VHDL code. I created the same logic as on the Atom (simple NAND logic), but I wasn't getting anything on the pin of the Papilio arcade wing. So I routed a number of debug signals to the LEDs, including the cassette out, and there it was. I modifed the code to assign the output of the logic to a signal and then to the port, and this seemed to fix the problem, although I'd really like to understand where the problem was.
If you post the not-working and working code, I'll take a look.
acory wrote: I was able to use the simple tape check code from "Atomic Theory". The first cassette tape was a problem as it stalled. I guess that the rubbers are old and smooth. I tried roughing them up but it still didn't work. So I tried another random TDK cassette. To my suprise there was audio, the guy who used to present Film 19XX (can't remember his name, and I didn't like him anyway). It was a recording from radio I assume of one of the BBC transmissions of computer programs over the air. It sounded similar, but more screechy than the Atom. I think that you had to have special software for your computer to decode it. Anyway I found a blank space further on and recorded a stream of X's. I then ran the code which reads them back with BGET, and I got a stream of X's on the screen of the Atom. Neat. So tape I/O appears to be working.
Great stuff.

I often start by making a WAV copy of the tape. Then you are covered if the tape breaks, and it's easy (e.g. in Audacity) to play the same block over and over again if you are having difficulty loading something.
acory wrote: So how do I temporarily disable SDDOS so that I can use "*LOAD" to load from cassette?
Hold CTRL down and press break.

By the way, the source for many of the ROMs is also in github. Here's the start of SDDOS where it checks for Ctrl pressed.
https://github.com/hoglet67/AtomFpga/bl ... nt.inc#L70

The reason it doesn't work when SDDOS is removed is that there is a patch to the Atom Kernel ROM to auto-initialize the ROM and E000, and that patch is not smart if there is no ROM there.

Dave

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

Re: ATOM FPGA

Post by acory » Thu Nov 03, 2016 12:46 am

Hi Dave,

thanks once again for the answers.

Having looked at a disassembly I remember that *DOS was the command to run my floppy disk "GAZDOS" from EPROM at 0xe000 (?). This is one of the source codes I would like to rescue. I suspect however that the code was actually on one of the 8" floppies which are now long gone, although I still have the home-brew hardware.

I may have solved the VHDL mystery. I had not defined the cassette in and out pins correctly in the UCF, so no wonder there was no signal. I had been using the 4 LEDs for various debug, so they were well defined and connecting the cassette out signal to one of these of course worked.

I have tried a number of tapes, both commercial and my own recordings, but once again I have wasted a lot of time by shooting myself in the foot! I connected the cassette-in wire to the wrong pin of the op-amp. Doh! My own recordings were on a very old cassette player that made a farting noise everytime a recording was started, so easy to recognise. Unfortunately the recorded signal is horrible. The output of the analogue circuit looked very poor.

So I tried a commercial tape. I tried "Centipede" by "Macro Media" having monitored the cassette in on the scope to get the best signal integrity, and first trying *CAT as described in the instructions. After 5 or so minutes it loaded and I was able to play the game. The keys on the PC keyboard were in an awkward position, but it was fun for 5 minutes anyway.

It seems that several of the cassettes are not Atom recordings, but a BBC radio program "The Chip Shop" narrated by Barry Norman back in the early to mid 80's. I ought to rescue them and take a listen.

Once I have finished the keyboard remapping/hacking I will get in touch and figure out how best to make the new code available should anyone want it.

--Gary

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

3,3v 5v interfacing

Post by eric » Sat Jan 12, 2019 9:18 am

Hi All,

I have a question for all the FPGA experts in here......

I was going through my chippies stock and found large SRAM chips ( that i bought for the Atom many years ago. (D431000A NEC SRAM 128kx8)

I would like to use them on my FPGA atom now but they are 5v TTL logic minimum 4,5v according to the datasheet.
Is there a safe way to hook them up to the 3,3v Xilinx FPGA ?
address lines and CE, R/W etc etc directly connected and the data lines 500 Ohm serial placed resistors ?

Grx...

Eric
Last edited by eric on Sat Jan 12, 2019 9:19 am, edited 1 time in total.

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

Re: 3,3v 5v interfacing

Post by hoglet » Sat Jan 12, 2019 10:41 am

eric wrote:
Sat Jan 12, 2019 9:18 am
I would like to use them on my FPGA atom now but they are 5v TTL logic minimum 4,5v according to the datasheet.
Is there a safe way to hook them up to the 3,3v Xilinx FPGA ?
address lines and CE, R/W etc etc directly connected and the data lines 500 Ohm serial placed resistors ?
To be honest, the easiest way would be to find a different SRAM that can be run off 3.3V, such as the AS6C1008
https://nl.farnell.com/alliance-memory/ ... t=AS6C1008

If you really want to use the parts you have, and your FPGA is a Spartan 3E (which has clamp diodes), then the approach you suggest (with series resistors) will probably work.

I made a Papilio wing with one of these a few years ago:
viewtopic.php?p=88030#p88030
IMG_0558.JPG
Dave
Last edited by hoglet on Sat Jan 12, 2019 10:45 am, edited 2 times in total.

Post Reply