PiStorm Chat

General discussions or ideas about hardware.
User avatar
alexh
Posts: 242
Joined: Tue Oct 17, 2017 4:51 pm
Location: Oxfordshire

Re: PiStorm Chat

Post by alexh »

Probably nothing but if you google "68000" and "2704" you get two references (1 2). Both have SR = 2704
Principal ASIC Engineer - SystemVerilog, VHDL
Thalion Webshrine - http://thalion.atari.org
STfm,STe,MegaSTe,Falcon060
A500+,A600,A4000/060,CD32,CDTV
Badwolf
Posts: 1316
Joined: Tue Nov 19, 2019 12:09 pm

Re: PiStorm Chat

Post by Badwolf »

alexh wrote: Thu Jun 30, 2022 12:31 pm Probably nothing but if you google "68000" and "2704" you get two references (1 2). Both have SR = 2704
Cool. Makes sense with it being a stack push for an exception then, doesn't it?

I'd guess it's the EmuTOS CPU detection code running.

I was thinking hardware fault last night (latch toggling all the time or something like that), but the more I think about it, and the solid reliability of the ROM (and, incidentally register) reads makes me think it's simply latch (or read-back from the flip flop) timing.

Here's the pertinent part of the CPLD logic:- https://github.com/captain-amygdala/pis ... orm.v#L242

Which on the face of it looks fine -- it latches in S4, having moved on from S3 only when DTACK is asserted. But I don't like the look of that PI_TXN_IN_PROGRESS_delay business. I might nix that.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
Badwolf
Posts: 1316
Joined: Tue Nov 19, 2019 12:09 pm

Re: PiStorm Chat

Post by Badwolf »

So it turns out the PiStorm logic was latching far too early in the bus cycle. This worked for ROM as I have a nice fast ROM that's driven early, but RAM follows the 68k datasheet more accurately and doesn't even drive the bus until some time after DTACK is asserted. One of those things where it's been tweaked down and down for speed, but only on one system.

The PiStorm was latching on DTACK received and therefore geetting mostly what was on the bus from the previous cycle. Latching in S6 and terminating the cycle in S7 sorted out the memory problems. There was then an issue with reset (the virtual CPU issuing a reset instruction also reset the CPU...). But then we get:





Now this is stuck in (I presume) an interrupt and doesn't progress pass the splash screen, but progress is being made.

I'm going to try to work on bus error next (tricky) so I can employ the diagnostic cart to help with the interrupt business. I *think* PiStorm ATM only handles autovectored interrupts and am pretty sure it doesn't issue an IACK properly, so plenty to work on there.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
agranlund
Posts: 774
Joined: Sun Aug 18, 2019 10:43 pm
Location: Sweden
Contact:

Re: PiStorm Chat

Post by agranlund »

This is awesome progress!

:bravo:
Steve
Posts: 2057
Joined: Fri Sep 15, 2017 11:49 am

Re: PiStorm Chat

Post by Steve »

I'm not exaggerating when I say this could be the most important and powerful piece of hardware on the atari platform, if you get it working :) Once the CPU side is working, we then suddenly have the ability to add all of these things: HDMI Nova-like graphics output in high res, high colour / USB drive mounting / wifi/ethernet and lots lots more possibilities .....
Badwolf
Posts: 1316
Joined: Tue Nov 19, 2019 12:09 pm

Re: PiStorm Chat

Post by Badwolf »

IMG_5643.jpeg
IMG_5643.jpeg (241.14 KiB) Viewed 386 times

Well that's a nice sight.

Bus error still crashes the emulator ATM (not wrapped my head around Musashi enough to know how to assert it), I've not written the bus arb yet (so no disc drives), it's slower than a wet weekend in the Western Isles (no attempt at optimisation) and it's crashing every few minutes, but progress!

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
alexh
Posts: 242
Joined: Tue Oct 17, 2017 4:51 pm
Location: Oxfordshire

Re: PiStorm Chat

Post by alexh »

Congratulations. What did you need to do to get this far?
Principal ASIC Engineer - SystemVerilog, VHDL
Thalion Webshrine - http://thalion.atari.org
STfm,STe,MegaSTe,Falcon060
A500+,A600,A4000/060,CD32,CDTV
Badwolf
Posts: 1316
Joined: Tue Nov 19, 2019 12:09 pm

Re: PiStorm Chat

Post by Badwolf »

alexh wrote: Tue Jul 05, 2022 8:47 pm Congratulations. What did you need to do to get this far?
Crikey. Quite a few things. Here's a couple I can think of off the top of my head:-
  • The reset instruction is a problem. It's not really working properly ATM. I tried changing the way the CPLD works but ended up commenting out the CPU re-initialisation in the emulator. You can't reset with the hardware button ATM.
  • Non-autovectored interrupt support. This is a hack at the moment. I added an interrupt acknowledge cycle but I'm just autovectoring IRQ 2 and 4. I'm not detecting VPA.
  • Slowed down the bus cycle. PiStorm had been (empirically) adjusted to latch on S4(!) as that works on Amiga. Changed to S6 for now.
  • Added FCx lines to each bus cycle and enabled in the CPLD and emulator.
  • Am checking every bus cycle for a bus error. This is slow.
  • Tried to get bus error to work in emulator, but ATM this is using a hacked EmuTOS without bus errors. Biggest problem still to solve. Segfaults occasionally.
  • Bus arbitration added to the CPLD to get the floppy to work
Very unstable ATM and obviously relies on that special EmuTOS. RAM access is very slow because of all those de-optimisations I've employed.

BUT disc access is now working:-

IMG_5646.jpeg
IMG_5646.jpeg (245.73 KiB) Viewed 351 times

CPU speed is OK. ROM is mapped from the Pi so nice and quick. RAM? There's your problem.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
exxos
Site Admin
Site Admin
Posts: 18962
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: PiStorm Chat

Post by exxos »

Some good progress in any case :thumbup: Half speed RAM is like hello world in CPU land :)
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
mgi
Posts: 56
Joined: Sun Jun 06, 2021 4:37 pm

Re: PiStorm Chat

Post by mgi »

Impressive progress!!!!
Post Reply

Return to “HARDWARE DISCUSSIONS”