Atom 2k18 ?

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

Re: Atom 2k18 ?

Post by hoglet » Wed May 01, 2019 9:25 pm

roland wrote:
Wed May 01, 2019 9:18 pm
It's not exactly "ACORN ATOM" but it is also not completely dead. I didn't check any signals yet because it took me quite a while to figure out what type of SPI ROM there is on my board. The schematic says M25P80, the manual says W25Q64 but it turns out that my board has a W25Q32 on board.

It will be a tough job to find out what's going on or not ....
Well, that's progress of sorts. :D

I'll have a think about this tomorrow...

Dave

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

Re: Atom 2k18 ?

Post by roland » Wed May 01, 2019 9:42 pm

It might be those three pull down resistors for if there is no via installed. I will also install them and the buffer they are connected to. And then try again.
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by hoglet » Thu May 02, 2019 1:49 am

roland wrote:
Wed May 01, 2019 9:42 pm
It might be those three pull down resistors for if there is no via installed. I will also install them and the buffer they are connected to. And then try again.
Yes, do install the pull down resistors, or alternatively edit AtomFpga_Atom2K18.vhd and build with CImplVIA => true.

However, I just spotted an error with the timing of the Phi2 signal created by AtomFpgaCore. This means that the timing of NRDS would be incorrect, which would probably mean the ROM and RAM are not being read properly.

In all the other targets, Phi2 is used only to generate a RAM write-enable signal, and the incorrect timing still works for this. In fact, it probably works better, because the write happens in the middle of the bus cycle, which helps avoid data hold time problems.

I will try to fix this tomorrow, and test as much as I can.

In the mean time, you could try the following work around:

Code: Select all

    bus_nrds    <= '0' when extern_ce  = '1' and extern_we = '0' else -- RamRom
                   '0' when extern_bus = '1' and rnw       = '1' else -- Bus
                   '1';
(i.e. remove the phi2 term)

Dave
Last edited by hoglet on Thu May 02, 2019 4:52 am, edited 3 times in total.

bprosman
Posts: 297
Joined: Sun Mar 29, 2015 10:27 pm
Contact:

Re: Atom 2k18 ?

Post by bprosman » Thu May 02, 2019 9:21 am

For the FPGA board you also could go for a "Hello world/blink LED" design to see the programming part working.
On the other hand, it is generating a video signal so it does something.

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

Re: Atom 2k18 ?

Post by roland » Thu May 02, 2019 9:27 am

The blinking led is in the last picture of this post: viewtopic.php?f=44&t=15197&start=180#p235746
Last edited by roland on Thu May 02, 2019 9:28 am, edited 1 time in total.
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by roland » Thu May 02, 2019 3:29 pm

I tried with the modified bus_nrds and CImplVIA = true but no difference. I will see if I can arrange a scope tomorrow at the monthly Atom User Group meeting.

BTW the display is much better than that with the Godil in the Atom 2K18, so at least there is one positive item for now :lol:
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by hoglet » Thu May 02, 2019 3:36 pm

roland wrote:
Thu May 02, 2019 3:29 pm
BTW the display is much better than that with the Godil in the Atom 2K18, so at least there is one positive item for now :lol:
Roland, I just sent you a PM with what I think the real problem might be!

User avatar
-B-
Posts: 130
Joined: Wed Nov 26, 2014 11:54 am
Location: Noordwijk ZH (NL) / Durham (UK)
Contact:

Re: Atom 2k18 ?

Post by -B- » Thu May 02, 2019 10:54 pm

roland wrote:
Thu May 02, 2019 3:29 pm
I will see if I can arrange a scope tomorrow at the monthly Atom User Group meeting.
There’s a monthly meeting? :shock:

Neil.
Atom | BBC Model A | BBC Model B | Electron | Olivetti PC128S.

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

Re: Atom 2k18 ?

Post by roland » Fri May 03, 2019 9:39 am

Yes, there is a monthly meeting in Sittard, every first Friday of the month. That's today \:D/
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by roland » Sun May 05, 2019 8:06 pm

IT'S ALIVE !!!!!

Today, Hoglet and I got the Atom 2k18 (a.k.a. FPGAtom) basically working. After a few days of @@@@ on the screen we finally got ACORN ATOM on it. I build the board as minimum as possible for two reasons: if it doesn't work at all then I spoiled as less as possible components (I am Dutch after all :lol: ) and second to exclude possible faults in circuits. So building block by block seemed a good idea to me.

Unfortunately, the FPGA decided otherwise. I had to add some addition components to make sure that not only RESET but also NMI, IRQ, SO and RDY were at a high level. This is quite reasonable. I though however that there were internal pull-ups. (Why don't I listen to myself? I always tell my daughter to stop thinking and start making things sure....)

With the great help of Hoglet, today I was greeted with ACORN ATOM on a beautiful screen. It's display is really much better than the Atom2k15 (at least in my Atom's) because the vertical blue interference is missing here.

Some pictures:
IMG_3599.JPG
IMG_3600.JPG
IMG_3601.JPG
As you can see, this board is a very suitable replacement for the Atom2k15 but it can also run standalone because of the PS/2 keyboard interface. In that case you have an AtomFpga with extended I/O capabilities.

My next step is to add more components, still in separate blocks, probably starting with VIA and I/O, then AtoMMC, mouse, audio and cassette interface. This also involved setting up the right EEPROM contents. Once there is a working Atom configuration I (or anybody else who wants to) can create his/her own configuration in the FPGA.

For people who don't want that challenge, there is another one: on the board is a code printed. I will never tell the exact phrase but the person who cracks the code before I arrive at the TechSat on June 8th 2019 at Vaessen gets a free FPGAtom pcb (bare board, including P&P within Europe) plus a bonus 7445.
IMG_3602.JPG
More challenges will follow, for example using this board with a 6809 core and use it as a Dragon, maybe it is even possible to use it as an early IBM-compatible PC ... after all it has 1 MB of memory and 640k ought to be enough :mrgreen:
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by oss003 » Mon May 06, 2019 6:10 am

Nice job guys .... looks great .... =D> =D> =D>

'One small step for man, one giant leap for mankind'

Greetings
Kees
Last edited by oss003 on Mon May 06, 2019 6:11 am, edited 1 time in total.

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

Re: Atom 2k18 ?

Post by roland » Mon May 06, 2019 6:14 am

oss003 wrote:
Mon May 06, 2019 6:10 am
'One small step for man, one giant leap for mankind'
Not even close :lol:
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by oss003 » Mon May 06, 2019 6:20 am

roland wrote:
Mon May 06, 2019 6:14 am
oss003 wrote:
Mon May 06, 2019 6:10 am
'One small step for man, one giant leap for mankind'
Not even close :lol:
Ok ........ 'One small step for man, one small leap for mankind' :lol:

User avatar
1024MAK
Posts: 9045
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Atom 2k18 ?

Post by 1024MAK » Mon May 06, 2019 7:33 am

Marvellous
=D> =D> =D>

Mark

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

Re: Atom 2k18 ?

Post by roland » Thu May 09, 2019 8:05 pm

A few days later .....
IMG_3608.JPG
We have the AtoMMC also running on the new Atom. Also the VIA is accessible so we are making good progress. I must admit that all the FPGA work until now (and probably also in the next few weeks) is excellent work of Hoglet. I really envy him for his knowledge of VHDL (and other technical stuff). But that is why I started this project. As soon as we have it completely up and running I can start adding some new things to the VDHL like interrupts on the serial port or so.

However, I also found a new design error: I wanted to implement a "keyboard connected" joystick so I added some tracks to a 15p SUB-D connector. Just for the safety of the FPGA I used a level-shifter annex buffer for protection. But that should have been an open collector device or something similar. That should also be a bunch of pull-up resistors at the connector side. Now, when U15 is fitted, the Atom hangs in its keyboard loop. Only pressing REPT will show a serie of QQQQQ's. It is fixable by making a special piece of electronic art with a 74LVC244 from which several pins are bent and connected with diodes and resistors. So, that's one of the next steps. After that I can test the joystick, cassette and serial interface.

To be continued....
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by roland » Thu May 09, 2019 8:17 pm

BTW .... the mouse is also working 8)

And it was time to run my ultimate and favourite test programme: Chuckie Egg. It runs without any problems, except that I have no sound. Snapper also runs fine but also no sound. Maybe this is related to the fact that the speaker is not connected yet :shock:

IMHO the colours need a bit of adjustment, I don't like the red colour and yellow has too little contract compared to green. I have seen better but this is just a matter of setting the output values because each colour now has two bits. The Godil had one bit for red and blue and two bits for green. It was an idea from Kees to add more bits so we can make a larger palette of colours.

I am very happy with the results up till now \:D/
Last edited by roland on Thu May 09, 2019 8:28 pm, edited 1 time in total.
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by hoglet » Thu May 09, 2019 8:54 pm

roland wrote:
Thu May 09, 2019 8:17 pm
And it was time to run my ultimate and favourite test programme: Chuckie Egg. It runs without any problems, except that I have no sound. Snapper also runs fine but also no sound. Maybe this is related to the fact that the speaker is not connected yet :shock:
Sound seems to work for me in Chuckie-Egg, but then I do have the speaker connected.

If you use the PS/2 keyboard, the function keys select different speeds:
- F1 = 1MHz
- F2 = 2MHz
- F3 = 4MHz
- F4 = 8MHz

The speedometer shows these are working, apart from 8MHz which immediately crashes.

I have a fix in another branch that seems to make 8MHz stable. Let me be the first to say, Chuckie Egg is not playable on an 8MHz Atom!

Dave

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

Re: Atom 2k18 ?

Post by hoglet » Fri May 10, 2019 4:49 pm

I've been working on a few things today:

These are all now pushed to github.

1. Multiple LED modes

The Knight Rider was beginning to annoy me, so I've made it more useful.

There are now four modes for the LEDs (and it would be easy to add more in the future):
- Mode 0: Displays the value in the LED_Data_Register (#BFE1)
- Mode 1: Displays Knight Rider (linked to the instruction execution speed)
- Mode 2: Displays the high byte of the CPU address bus
- Mode 3: Displays the low byte of the CPU address bus

The mode is selected by bits 1..0 of the LED_Ctrl_Register (#BFE0)

The push switches on the FPGA module increment/decrement the mode as well. The switches are properly debounced:
https://github.com/hoglet67/AtomFpga/bl ... bounce.vhd

2. Turbo Mode

Turbo mode from bits 6,5 of #BFFE is now wired up. If you are using the PS/2 keyboard, pressing F1..F4 should also update the mode. I think there might be a bug with this in certain cases.

3. Clocking and 8MHz operation

I've changed the main clock from 16MHz to 32MHz, which has fixed the issues with the 8MHz turbo mode (?#BFFE=96). I'm using -55 RAM and -70 FLASH and this seems quite stable.

The only remaining work is to add wait states when the external bus is accessed at 4MHz (1 wait state) or 8 MHZ (3 wait states). That would give the bus a maximum speed of 2MHz.

4. Investigate a reset bug

I discovered that hitting break when a SID is playing causes a very nasty crash. Even re-initializing the FPGA doesn't fix it.

The bug only happens when using the PS/2 keyboard and is related to reset on the 6522 (when it's generating timer interrupts).

When using the matrix keyboard, pressing break generates a reset, and everything is fine. But when using the PS/2 keyboard, pressing break (F10) only resets the 6502 in the FPGA. This is because the NRST pin of the FPGA is currently an input.

I think the fix is to do the following:
- redefine the NRST pin as bidirectional
- during power up reset, the FPGA should pull NRST low
- when the PS/2 keyboard is selected and F10 is pressed, the FPGA should pull NRST low
- at other times NRST should be "Z" (high impedance) and operate as an input
- remove C24 (10uF)

Removing the C24 capacitor is really just a precaution, as it's quite a lot of capacitance for the FPGA to try to discharge.

Are you happy if I make this change tomorrow Roland?

I don't have plans for anything else beyond what's outlined in this post.

Dave
Last edited by hoglet on Fri May 10, 2019 4:50 pm, edited 1 time in total.

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

Re: Atom 2k18 ?

Post by roland » Fri May 10, 2019 9:59 pm

I am fine with those changes. No hurry as I am occupied this Saturday. I will update my fpga probably not before Sunday so take your time. Doing something useful with the leds and switches was also on my wish list. I was thinking about "displaying" the contents of #BFFE/F. You can leave that as an excersize for me :lol:

Btw ... Is this Atom faster than a normal Atom when running at 1MHz or is it just my imagination? Or is the screen handling faster?
Last edited by roland on Fri May 10, 2019 10:01 pm, edited 1 time in total.
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by hoglet » Sat May 11, 2019 6:17 am

roland wrote:
Fri May 10, 2019 9:59 pm
Btw ... Is this Atom faster than a normal Atom when running at 1MHz or is it just my imagination? Or is the screen handling faster?
It should be the same, so if you think it's faster than that would be a bug!

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

Re: Atom 2k18 ?

Post by hoglet » Sat May 11, 2019 6:41 am

roland wrote:
Fri May 10, 2019 9:59 pm
I was thinking about "displaying" the contents of #BFFE/F. You can leave that as an excersize for me :lol:
I will leave that as an exercise, but it's actually going to be quite fiddly to do because, BFFE/F are buried deep in the core, and are generated by a pluggable module, so you would have to add them to about 5 modules in total (AtomFpga_Core and each of the RamRom units). It's fine to do that though.

The good news though is that connecting to output ports is optional, so you would not need to modify the wrappers for the other targets, if a port is not listed it's just left unconnected. You can also do this with input ports if there is a default value assigned.

Dave
Last edited by hoglet on Sat May 11, 2019 6:41 am, edited 1 time in total.

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

Re: Atom 2k18 ?

Post by roland » Wed May 15, 2019 8:42 pm

Again few days later .....
roland wrote:
Thu May 09, 2019 8:05 pm
However, I also found a new design error: I wanted to implement a "keyboard connected" joystick so I added some tracks to a 15p SUB-D connector. Just for the safety of the FPGA I used a level-shifter annex buffer for protection. But that should have been an open collector device or something similar. That should also be a bunch of pull-up resistors at the connector side. Now, when U15 is fitted, the Atom hangs in its keyboard loop. Only pressing REPT will show a serie of QQQQQ's. It is fixable by making a special piece of electronic art with a 74LVC244 from which several pins are bent and connected with diodes and resistors. So, that's one of the next steps. After that I can test the joystick, cassette and serial interface.
And here it is: the joystick interface IC:
IMG_3620.JPG
IMG_3621.JPG
IMG_3622.JPG
I used 10k resistors for the pull-up on the input side and BAT42 shottky diodes at the output side. Works like a charm :D

I also installed the audio circuit (DAC and amplifier) and now I can play Chuckie Egg with sound. Also the SID is working, but we already knew that from Hoglet's posts. Next to test is the serial circuit, the cassette interface and PiTube.

Just one thought .... are the decoupling capacitors necessary when the board has separate ground and power planes? Do they make sense? Just for test I did not solder them on the board, just to see how it will behave and I don't notice any issues....
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by hoglet » Wed May 15, 2019 9:03 pm

roland wrote:
Wed May 15, 2019 8:42 pm
Just one thought .... are the decoupling capacitors necessary when the board has separate ground and power planes? Do they make sense? Just for test I did not solder them on the board, just to see how it will behave and I don't notice any issues....
Yes, they are still very beneficial.

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

Re: Atom 2k18 ?

Post by roland » Wed Jun 05, 2019 8:48 pm

Just two pictures. Hoglet and I have a discussion about the colours.... especially orange. And as you know, orange is an important colour for the Dutch :lol:
IMG_3641.JPG
IMG_3642.JPG
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
myelin
Posts: 706
Joined: Tue Apr 26, 2016 9:17 pm
Location: Mountain View, CA, USA
Contact:

Re: Atom 2k18 ?

Post by myelin » Wed Jun 05, 2019 11:46 pm

"This board is dedicated to my Atomic friends Willy Truyen and Guido Baltus" :)

Start bit | 7 data bits, LSB first | parity bit | two stop bits

0 0010101 1 11

-> 1010100 or 'T'

... and so on :)

Thanks for the puzzle!
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most interesting: Arcflash, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

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

Re: Atom 2k18 ?

Post by roland » Thu Jun 06, 2019 8:03 am

That's correct =D>

PM me your address and I will send you a board. Congratulations. To be honoust, Hoglet had it already decoded weeks ago but he already received a board for development.
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by roland » Sun Jun 16, 2019 4:18 pm

Today I build a Y-splitter for the 15p I/O connector so that I can connect a joystick, cassette recorder and a serial device to the new FPGAtom. Unfortunately all three cassette recorders that I have seem to be broken. One even started to smoke before I connected an Atom to it :roll: I wanted to see if the FPGAtom can read and write tapes and eventually make tape-backups of my mass-storage :lol: Bad luck....
IMG_3645.JPG
IMG_3646.JPG
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom 2k18 ?

Post by roland » Sun Jun 16, 2019 4:31 pm

The FPGAtom has become quite a stable system. Hoglet did a great job getting it to work. However there are some small errors on the board that must be corrected for a second batch. The is still one board left from the first batch.

Anyway, is there any interest in this audience for this new Atom? It can be used with the default Atom keyboard (if you have one or you build one) or with a PS/2 keyboard. The benefit over the other FPGA-based Atoms is that it has I/O expansions and a tube interface. If there is enough interest for a board I will remove the errors in the design and create a new batch of boards. Just respond to this topic if you =P~
IMG_3647.JPG
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
Elminster
Posts: 3690
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Atom 2k18 ?

Post by Elminster » Sun Jun 16, 2019 9:44 pm

If there is enough interest then I would probably take one from a second batch, what was the final approx cost for board and parts?

Post Reply