New PCW FPGA hardware emulator

Started by steddyman, 18:23, 05 July 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

steddyman

Hi everyone


I am developing a new PCW hardware emulator for the MiSTer FPGA project.


I've already made quite a bit of progress and have the video, memory management mapping and disk subsystem recreated.  I can get the PCW to boot of the boot sector, then start to load CPM (or other disk).


However, due to a difference between how the signals of the NEC765 are handled between the CPC and PCW I have hit a boot issue (the PCW issues the TC disk signal).  I can get the emulator to boot to the point it loads the boot sector, then turns on the screen and starts loading the rest of the CPM system.


However, it gets to Track 5, sector 9, then seems to get stuck.  At that point the screen is white, with the top quarter filled with horizontal black lines.  It then flashes between that screen and all white and retries a number of times.


Beyond what I've read of the PCW hardware, required to recreate the logic, I don't know a great deal about the format of the disks or the CPM booting process.  Is there anything special about this track that could cause problems?  Does the point where is stopping give any clues as to what may be wrong with my disk emulation?


Thanks

GUNHED

http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.03.09)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

robcfg

Welcome!


I'm not sure if there's anything special on that track and sector.


Which disk image are you trying to boot?

steddyman

Thanks.  I've tried quite a few, things like the Blagger Boot disk or Infocom boot disk.


I presume the place it stops with about 1/4 the screen having the black in is some indicator of where it got to?


I have had to modify the NEC765 implementation from the CPC MiSTer core, but add some handling for the TC line and interrupts.  Either there is something special about that sector (doubt it) or that portion of the CPM boot, starts to look for different signals from the disk (maybe because the XBIOS takes over)?  I can see in the signal trace it tries to load the same sector multiple times.

JohnElliott

#4
On the PCW8256 boot disk I tested, J14CPM3.EMS goes all the way from track 1 sector 4 to track 10 sector 2, so track 5 sector 9 is in the middle of it the EMS file and has nothing special about it.

The 9512 boot disk I tested had J21CPM3.EMS going from track 12 sector 5 to track 21 sector 7 -- that's cylinder 6, head 0, sector 5 to cylinder 10, head 1, sector 7, and neither track 5 nor cylinder 5 gets a look-in.

LocoLink has a smaller EMS file -- if you can get your hands on a LocoLink boot disk, does that behave any differently?

steddyman

Quote from: JohnElliott on 02:21, 06 July 20
On the PCW8256 boot disk I tested, J14CPM3.EMS goes all the way from track 1 sector 4 to track 10 sector 2, so track 5 sector 9 is in the middle of it the EMS file and has nothing special about it.

The 9512 boot disk I tested had J21CPM3.EMS going from track 12 sector 5 to track 21 sector 7 -- that's cylinder 6, head 0, sector 5 to cylinder 10, head 1, sector 7, and neither track 5 nor cylinder 5 gets a look-in.

LocoLink has a smaller EMS file -- if you can get your hands on a LocoLink boot disk, does that behave any differently?


Thanks John, I appreciate that.  That's very helpful.


I couldn't track down a LocoLink disk though I could find plenty of games to test but they all do the same.


I'll keep tracing and see if I can see anything out of the ordinary.


Thanks

Vince

This is very cool indeed and I look forward to hearing more of your progress.
I am very interested in FPGAs.  8)

steddyman

I'm getting closer.  I've ended up having to disassemble and comment all of the CPM boot process that is loaded from the boot sector code, so I can trace exactly where the issue is.

breiztiger

hi

very good to see this amstrad computer arrive in mister cores ...

and i think you can help to debug fdc in cpc core because it has some probs with protection like this https://www.atari-forum.com/viewtopic.php?p=393544#p393544


steddyman

Hi


Thanks for the post.  However, I don't think this is a protection issue. The disks I am trying to boot are simple CPM boot disks without protection at this stage.  It seems to be down to how the PCW issues the Termincal Count command to terminate transfers, which the CPC core does not do.  I've implemented TC, but maybe not exactly right.  The Datasheet doesn't do a good job of describing exactly what happens when TC goes high and low.  Currently I have it move from EXECUTE to RESPONSE phase while maintaining the status registers.

steddyman

I'm starting to make good progress now.  Quick video of it direct booting the Buran game.  Still got an issue with CPM to resolve and no keyboard support yet.



https://youtu.be/MyE1c0D7HiE

Redbug

RedBug/Crazy Piri
Our productions on itch.io

steddyman

Quick update.  The keyboard is now working.



https://youtu.be/1IrI-LB45WU

steddyman

Hi everyone


Disk reading issues are now fixed and the core can run at upto 32Mhz.  Still got one disk issue to track down but I am expecting to release the core this week.


I've just finished adding DKTronics sound and joystick support.  Here is a little demo:



https://youtu.be/ShGYL9Fc8rM

GUNHED

Quote from: steddyman on 12:26, 10 August 20
... and the core can run at upto 32Mhz.nd and joystick support.


Does this mean, that the hardware emulator can run 8x faster than a real PcW?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.03.09)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

steddyman

Yes it does.  It can run at 1x, 2x, 4x or 8x speed.


It works suprisingly well on the PCW.  Because most games are timed to the screen refresh or system timer, which both don't change, most things operate correctly but just a lot smoother.  Even AY sound is tagged to a fixed frequency so it sounds correct at higher clocks.

GUNHED

This is truely amazing!!!!!!!!!!!!!!!!!!!!!  :) :) :) :) :) :) :) :) :) :) :)
Need to get one of them. Can a working unit be bought, or must we put together a kit?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.03.09)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)


steddyman

Currently the PCW core requires nothing other than the DE10-Nano.  It doesn't need SDRAM or any of the other addons.


I will probably add support for SDRAM soon though so it can support more than 256k memory.

GUNHED

Quote from: steddyman on 19:07, 12 August 20
Currently the PCW core requires nothing other than the DE10-Nano.  It doesn't need SDRAM or any of the other addons.
Awesome!

Quote from: steddyman on 19:07, 12 August 20
I will probably add support for SDRAM soon though so it can support more than 256k memory.
That is a great idea. IIRC there are memory expansions for the PcW up to 4 MB.  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.03.09)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

steddyman


Keeping the memory to 256k allows me to use the BRAM on the FPGA which brings the benefit that the video access does not slow down the CPU at all and it has very low latency.  But I will expand the memory out to the full size supported by the system soon, and just use the BRAM for the first 128k.  The video memory can only be in the first 128k anyway.

steddyman

#21

I'm happy to report that the first release of the Amstrad PCW core is now available on the main MiSTer site.


If you run the update script on your MiSTer, then it should automatically download and install.

Alternatively you can download it from the 'releases' folder.

https://github.com/MiSTer-devel/Amstrad-PCW_MiSTer

I hope you like it. Let me know any problems you find.

Thanks

arkive

Many thanks, it's an awesome addition to MiSTer's micro core shelf. Will try it asap.

funkheld

#23

Hi good afternoon.


i played the mister and the joyce 8256.
a great thing.


in the video you have mount b:
but that's not on my core yet.


I'm looking forward to the 2mb extension.


i have the mister from here : https://manuferhi.com/p/mister-fpga-32mb
it is available as a kit or completely assembled.


thank you.
greeting

steddyman

Hi


Yes, I originally had B: drive support but pulled it for the 1st release due to a compatibility issue.  That issue is now resolved and I have also added a bunch of other new features, such as PCW9512+ mode with 3.5" boot disk support.  I haven't yet put that version live though because I'm just enhancing it a little further.  Please be patient a little longer.

Powered by SMFPacks Menu Editor Mod