VOGONS


First post, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

ISA PicoMEM Extension board (For 8086/8088 PC, 286 and more to come)

Hi,
I wrote a post for my board initially on VCFED forum, but the number of "reactions" there is quite low.
I am "Known" (I Think) here for my Work on Mod Master XT and I come back with a Semi HW and SW Project.

After I released Mod Master XT 1.0, I needed another challenge and I wanted to work on 3 areas:
- Go back to Hardware (I an an electronic engineer, but did not practice since 20 years)
- Work on emulator code
- Code with modern dev tools (GitHub and so on)

After I saw the PiStorm project (68000 emulation on a Pi) I decided to do something equivalemt for the PC.
BUT:
- Pi was no more available, Pi is TOO much powerfull (Overkill) and expensive
- I did not want to do a CPU emulation, as we all know that if we want a more powerfulle 8088, we just take a 286....

I was also frustrated to see everywhere devices to use .ROM files on microSD on all the retro micro and not on the PC.
TI99, PET, ZX Spectrum, CPC, Commodore 64, Atari ST... All these machine has much more powerfull way to use images than the PC.

I started to work on Hardware design and some weeks after, @polpo released his PiGUS.
I contacted him and we shared some infos on how to better multiplex the data on the PicoGUS,.
Then I made my design based on a more complex multiplexing.

The use of a Pi Pico is Ian idea, as I never heard about it before. So, without Ian help, PicoMEM was impossible.

We now have a Discord server where we try to discuss with all the Pi Pico based retro makers.

PicoMEMV1.jpg
Filename
PicoMEMV1.jpg
File size
306.24 KiB
Views
11595 views
File license
CC-BY-4.0

Introduction

The PicoMEM is designed as a way to run Emulated ISA boards on a real PC.
The PicoMEM Board currently connect the full 8Bit Memory and I/O Bus plus an IRQ to a Raspberry Pi Pico, through some multiplexor/Level shifter chip.
The Pi Pico also has a 8Mbyte PSRAM connected in SPI and a MicroSD Slot.

The PicoMEM Board can be seen as both a working PC extention board as well as a Development platform.

Board description

Hardware :
- 2 Layers ISA Board connecting a Raspberry Pi Pico through some buffers/Multiplexor and inverter.
- The Pi Pico is connected to the full Memory and I/O Address space, and one IRQ. (No DMA)
- The Pi Pico is connected to a PSRAM (8Mb, 130MHz, PIO) and a MicroSD slot (20MHz, PIO) in SPI.
- The Pi Pico is used at 260MHz.
- The MicroSD connector share the SPI BUS of the PSRAM, adding some limitations. (We need to stop the PC IRQ during Disk Access)

Software :
- a Full BIOS with a "Phoenix BIOS Like" text interface in assembly.
- C/C++ Code in the Pi Pico
- Multiple other projects library used (List beloy)
- The PC can send multiple command to ask the Pico to perform tasks
- In the reverse, the Pico can also send commands to the Pico

Advantages

- The Board design is simple and the Pi Pico is available : Quite easy to produce, not expensive.
- As it is mainely software, the limits are only the imagination (And Time)
- If we check the currently available functions, even if one of them was working, it was worth to do the board.
- Can be used by anybody to experiment in coding, from ARM side and PC Side, in fact it is one of the main goal for me to do this board : Learn
- Can be used to test Emulation code on Real Hardware : This is a bridge between emulator and real hardware.
- This is not based on a super overpowered CPU that can do everything. There is a real challenge to have this working.

Current Functionality

- Memory emulation with 16Kb Address granularity:
> 128Kb of RAM can be emulated from the Pi Pico internal RAM with No Wait State. (4MHz ISA)
> We can emulate the whole 1Mb of RAM address space from the PSRAM. (With 6 Wait Stated for 4MHz ISA)
> EMS Emulation of Up to 6 / 7 MHz. (Only 4Mb for the moment as using the LoTech EMS Driver)
> Memory emulation is also used to add (4Kb of "Private" memory for the PicoMEM BIOS Usage)
> 16Kb of RAM is also added for disk access (Or other) even if 512Kb only is used for the moment.

- ROM Emulation for its internal BIOS and custom ROM loaded from the MicroSD.
- The Board has its own BIOS, used to automatically detect/Extend/Configure the RAM emulation, and select Floppy/Disk images
- Floppy and Disk emulation from .img files stored in uSD through FasFs and DosBOX int13h emulation code.
- Emulate 2 Floppy and 4 Disk (80h to 83h), Disk up to 4Gb (More later)

Future Functionality

- There is already a mecanism implemented so that the Pi Pico can send command to the PC, ve can have the Pi Pico taking "Virtually" the control of the PC.
> This can be used to perform ROM/RAM dump, Disk/Floppy DUMP/Write, display/kb redirection....
- USB Host mode to be added, I have difficulties to compile the TinyUSB Host code for the moment
- I added a connector on the board, that can open the door lor lot of stuff (More or less "Secret" for the moment, I need to keep some surprize for myself)
- Use the Pi PicoW to emulate network card and do some stuff remotely, why not Bluetooth joystick ? There is no guarantee it will be done.
- Any kind of board can be emulated if its interfacing and CPU power needs are satisfied. (No DMA, no emulation, no complex floating point calculation...)
- The board can be chaged

Compatibility/Limitations

The Board has been tested on machine with various machines.
It seems to fail on some due to timing issue (More likely on 8MHz ISA bus)

The Board can't be used for Video emulation, as it require a way for the Pico to actually display something, and only 3 pins are "Free".
The Pi Pico is limmited in its speed, this is excellent and bad at the same time:
- Multiple complex function can't be emulated at the same time, choices need to be done.
- We can still program the Pico and Feel like doing coding on a "Retro" Machine, so we don't have the effect "Look, it is easy, he put a processor in the PC that can emulate the full PC"

Memory emulation:
Memory emulation with PSRAM is quite slow for the moment, but multiple mecanism like a 32b cache will improve this. (And Maybe DMA)
The emulated Memory does not support DMA, I did not proof it is not 100% feasible, but it require quite complex coding to be possible (Snif the DMA registers, change code that may add unstability)
Anyway:
- As the PicoMEM emulate the Floppy, we can disable temporarily the RAM emulation if the Disk access are not working.
- For SoundCard, if the PC has 512Kb of base RAM, it is really unlikely that the DMA Buffer will be placed in emulated RAM, it may work 90% of the time.

Disk emulation:
uSD Disk access are really fast even compared to the XTIDE, but it it currently limitted by the uSD acces time for write.
The Code reading multiple sectors failed in one of my uSD, so I did not enabled it for the moment.
! All the uSD Does nto work for the moment, to be checked.

Tested machines:
- IBM 5150, 5160, 5170 : All Ok, except keyboard not responding on 5170.
- Compaq Portable 2 (286): Ok
- Amstrad PC1512, PC1640, PC200: Working, but fail to start all the times on one PC1512 and sometime on PC1640.
- Tandy 1000 : Does not work yet due to the specific memory map.
- Worked on Various 486, 386 (No confirmation of the ISA Clock speed yet)
- Failed on a 386 with 8MHz ISA Clock

Contributors / External Libraries

* Ian Scott (https://github.com/polpo/): Idea to use the Pi Pico instead of the not available Pi 2/4 and Zero plus help on the Hardware design.
* PSRAM Code by Ian Scott (https://github.com/polpo/rp2040-psram) : PSRAM PIO Code.
* FatFS by Chan (http://elm-chan.org/fsw/ff/00index_e.html) : ExFS Library for microcontrollers.
* FatFS by Carl J Kugler III (https://github.com/carlk3/no-OS-FatFS-SD-SPI-RPi-Pico) : FatFS for SD Access in SPI with a Pi Pico
* DOSBox (www.dosbox.com): DosBOX BIOS Int13h Code, heavily modified for ExFS support and PicoMEM Interface, with bug correction.

The PicoMEM Board in the Sinclair PC200

PicoMEM_PC200.jpg
Filename
PicoMEM_PC200.jpg
File size
377.81 KiB
Views
11595 views
File license
CC-BY-4.0

BIOS Menu : RAM config and image selection

BIOSRAM.jpg
Filename
BIOSRAM.jpg
File size
470.34 KiB
Views
11595 views
File license
CC-BY-4.0
PM-DiskSelect.jpg
Filename
PM-DiskSelect.jpg
File size
467.27 KiB
Views
11595 views
File license
CC-BY-4.0

DOS Boot:

PM_DOS331.jpg
Filename
PM_DOS331.jpg
File size
327.41 KiB
Views
11595 views
File license
CC-BY-4.0

Rodrik Studio Video:
https://youtu.be/urBkxpwz69Q?si=4VhoQBLQ8EzyQVRm

RetroErik Video:
https://youtu.be/PwSLWsxip00?si=Ehzuv5D_560-ekXy

Last edited by FreddyV on 2024-03-22, 10:08. Edited 10 times in total.

Reply 1 of 148, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Other pictures:

PMBoardV1.jpg
Filename
PMBoardV1.jpg
File size
571.19 KiB
Views
11594 views
File license
CC-BY-4.0
PM_CheckitTest.jpg
Filename
PM_CheckitTest.jpg
File size
506.1 KiB
Views
11594 views
File license
CC-BY-4.0
PM_CPMBoot.jpg
Filename
PM_CPMBoot.jpg
File size
326.51 KiB
Views
11594 views
File license
CC-BY-4.0
PM_FreeDOSBoot.jpg
Filename
PM_FreeDOSBoot.jpg
File size
435.8 KiB
Views
11594 views
File license
CC-BY-4.0

Disktest speed is NOT the real speed, as IRQ are disabled during disk access, the reality is smaller (But not that much)

PMDisktest.jpg
Filename
PMDisktest.jpg
File size
306.38 KiB
Views
11594 views
File license
CC-BY-4.0

Reply 3 of 148, by keropi

User metadata
Rank l33t++
Rank
l33t++

I like it, great work!!!
really love the setup utility looks - faux BIOS-like 😀

do not be disheartened, it is normal that a XT-related piece of kit does not get much love quickly since the whole "XT scene" is not that popular with few (but dedicated!) followers...

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 4 of 148, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
keropi wrote on 2023-05-24, 07:34:

I like it, great work!!!
really love the setup utility looks - faux BIOS-like 😀

do not be disheartened, it is normal that a XT-related piece of kit does not get much love quickly since the whole "XT scene" is not that popular with few (but dedicated!) followers...

The SETUP Utility IS a BIOS, it is started as a ROM extention (ROM Emulation)

With all the forum and facebook post I see around people trying to use XTIDE on XT machine, I think the interrest on XT is rizing, since some years.

Because the 486 are all the same, pentium and other even more.
We find unique and interresting machines, mainly in XT class PC.

This board WILL Be usefull for other PC, not only XT, I focus on XT for the moment because it is there that the PicoMEM is the more usefull.

What about USB KB/Mouse, Bluetooth Joystick, Wifi ethernet on a 386/486 ? This card may be able to do it.

It will also open the door to Pi Zero based boards for more interresting emulation.
But the Other pi need to be available first.

This board is a beginning of something else, more or less 😀

Reply 5 of 148, by rucuk0kt

User metadata
Rank Newbie
Rank
Newbie

I like it too, because it's so versatile.
If 8 MHz operation is somewhat reliable and the price + shipping (EU) is right, I'd buy some.
Preferably with socketed pico, so it can easily be replaced with an improved pico if the Raspberry Pi Foundation releases one.

Reply 6 of 148, by polpo

User metadata
Rank Member
Rank
Member

Even if this card only had the disk emulation feature, it would be a game changer. Being able to select disk images on a microSD card in the BIOS is amazing and so much more flexible than XTIDE. And then there's everything else that it can do.

Thanks for the kind words about the idea that got you started on this project.

Reply 7 of 148, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

Can't deny the Pi Pico is nice and cheap, but for a multi-purpose ISA device (RAM, disk, USB, audio, network...) I think there are much easier/better options. My pick is the Teensy 4.1; a 600MHz cpu, 8MB of onboard flash (minus storage required for code), two USB host/device ports, SD slot, 100mbit ethernet, three built-in audio interfaces (SPDIF, I2S and low-quality PWM) and optional support for 2 PSRAM/serial flash chips. It can do VGA output with a bit of coaxing, although needs an external DAC if you wanted to output more than 16 colors.

Reply 8 of 148, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
jmarsh wrote on 2023-05-24, 13:51:

Can't deny the Pi Pico is nice and cheap, but for a multi-purpose ISA device (RAM, disk, USB, audio, network...) I think there are much easier/better options. My pick is the Teensy 4.1; a 600MHz cpu, 8MB of onboard flash (minus storage required for code), two USB host/device ports, SD slot, 100mbit ethernet, three built-in audio interfaces (SPDIF, I2S and low-quality PWM) and optional support for 2 PSRAM/serial flash chips. It can do VGA output with a bit of coaxing, although needs an external DAC if you wanted to output more than 16 colors.

Hi,

As My first choice was the Pi and @polpo proved that managing the PC I/O on a Pico was possible, I went to the Pico.
What I like is that the Pico is Slow... this is more challenging.
Even with a fast Pi4, the PiStorm need an FPGA... this is something I wanted to avoid at all cost, to have a board accessible to all.

I did check the Teensy, but it is single core, so need to use IRQ to trap the ISA Bus Cycles, and manage all the rest...

Anyway, like I wrote just above, My Board may open the way to something else.. I may also do in the future.
(Pi Pico 2, Pi Zero....)

I saw other project with Teensy, like:
https://hackaday.io/project/188672-teensy-rom-emulator
A 600MHz CPU only to emulate ROM.... the Pico can do it with 0 CPU time

The XTA2SD :
https://forum.vcfed.org/index.php?threads/8-b … 1224016/page-16

This emulate an XT Disk (With the advantage to Free an ISA Bus for XT with a Disk interface) With the Teensy
This board use 8 Main chip, including a CPLD apparently. This cost a lot more than the PicoMEM, only to do disk.
XT computers with a Disk interface are XT from the end of the 80'S (Commodore PC, Schneider euro PC, PS/2....) then the scope is limitted.

https://forum.vcfed.org/index.php?threads/dro … -mcl86.1237413/
MCL86+ 8088 replacement with Teensy, this is cool and need to be checked out 😀

Reply 9 of 148, by konc

User metadata
Rank l33t
Rank
l33t
FreddyV wrote on 2023-05-24, 07:16:

No reaction even here...

Just another point of view, many people don't even understand what this card does/can do. I'm starting to understand something by reading the discussion as it unfolds, so don't assume nobody cares. Maybe it's too awesome!

Reply 10 of 148, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
konc wrote on 2023-05-24, 14:43:

Just another point of view, many people don't even understand what this card does/can do. I'm starting to understand something by reading the discussion as it unfolds, so don't assume nobody cares. Maybe it's too awesome!

Thanks,
I was eager to discuss on vogons, as the discussions about Mod Master XT was huge here 😀

Reply 11 of 148, by chiveicrook

User metadata
Rank Newbie
Rank
Newbie

Awesome stuff!
I've been musing about a similar card using Pico/RP2040 (fixed function though) but for AT era H/W.

RP2040 chip is extremely versatile and quite fast even if slightly RAM limited.
I've worked on a couple professional projects utilizing it to great effect.

If only there were more than 24 hours in a day... so many hobbies, so little time 😁

Reply 12 of 148, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
chiveicrook wrote on 2023-05-24, 17:32:
Awesome stuff! I've been musing about a similar card using Pico/RP2040 (fixed function though) but for AT era H/W. […]
Show full quote

Awesome stuff!
I've been musing about a similar card using Pico/RP2040 (fixed function though) but for AT era H/W.

RP2040 chip is extremely versatile and quite fast even if slightly RAM limited.
I've worked on a couple professional projects utilizing it to great effect.

If only there were more than 24 hours in a day... so many hobbies, so little time 😁

Thanks,

For AT, there is the PicoGUS showing it is possible.
The PicoMEM concept add the ROM and RAM emulation (For fast Disk emulation), I saw it is also possible on >4MHz ISA, but withg modification in the code.
And this is not a problem, because the functions that need to be removed are useless on AT....

With a Team, discord channel, GitHub, time become relative.

The PicoMEM for AT could be more :
- MicroSD (Slower than an IDE Disk, but good to test multiple disk images, transfer files, floppy emulation....)
- USB Host : KB, Mouse other when support will be added in TinyUSB
- Wifi Network
- Other (secret for the moment) stuff
- developpment / to play with the ISA interface

So, the PicoMEM, without memory/EMS (not needed)

Last edited by FreddyV on 2023-05-24, 18:37. Edited 1 time in total.

Reply 13 of 148, by zyga64

User metadata
Rank Oldbie
Rank
Oldbie

When it comes to data transfer speed, do you think that CDROM emulation is possible with PICO ?
(I'm thinking about ISO images, or even better CUE/BIN with audio track support).

On the other hand RP2040 based ZuluSCSI reaches up to 9.1 megabytes/second, so...

1) VLSI SCAMP /286@20 /4M /CL-GD5422 /CMI8330
2) i420EX /486DX33 /16M /TGUI9440 /GUS+ALS100+MT32PI
3) i430FX /K6-2@400 /64M /Rage Pro PCI /ES1370+YMF718
4) i440BX /P!!!750 /256M /MX440 /SBLive!
5) iB75 /3470s /4G /HD7750 /HDA

Reply 14 of 148, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

9Mb/s is probably even not possible on an 8Bit ISA at all, so 😀

I did not check how this zulu Work, but the MicroSD is quite Slow, I got 2Mb/s on it and need less than 500Kb/s for the maximum speed on the 4MHz ISA
This is doing multiple sectors read, because the SD is really slow at random read.

If somebody want to try this in the future, when PicoMEM source will be published, no problem.
I don't think I will do it myself, I don't think it is a priority.

Why it is so important for you, when real CD drive are so simple to find everywhere ?

Reply 15 of 148, by keropi

User metadata
Rank l33t++
Rank
l33t++

CD-ROM emulation with audio would be pure awesomeness. Sure drives are available but they are old , noisy, not possible to use with any system and bound to fail - not to mention you need to have a bunch of discs nearby ...

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 16 of 148, by zyga64

User metadata
Rank Oldbie
Rank
Oldbie
FreddyV wrote on 2023-05-24, 18:42:

Why it is so important for you, when real CD drive are so simple to find everywhere ?

Well, it is not THAT important. It just will be nice to have 😀
I think that 2x CD-ROM speed will be enough for DOS use (300 kB/s)

1) VLSI SCAMP /286@20 /4M /CL-GD5422 /CMI8330
2) i420EX /486DX33 /16M /TGUI9440 /GUS+ALS100+MT32PI
3) i430FX /K6-2@400 /64M /Rage Pro PCI /ES1370+YMF718
4) i440BX /P!!!750 /256M /MX440 /SBLive!
5) iB75 /3470s /4G /HD7750 /HDA

Reply 17 of 148, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
keropi wrote on 2023-05-24, 19:23:

CD-ROM emulation with audio would be pure awesomeness. Sure drives are available but they are old , noisy, not possible to use with any system and bound to fail - not to mention you need to have a bunch of discs nearby ...

Yes of course.

I reviewed the ZuluSCSI code, they use the SD in SDIO (Need 6 Pin) and use 32 PIO instructions.
This is much faster and mature than my code, because I am less skilled than them in SD coding (I only spend some days on it) and I did not need this speed. (ISA is Slow)

The PicoMEM is limitted in what it can do, the goal is to do a maximum of function well, and not one super fast.

Reply 19 of 148, by Yoghoo

User metadata
Rank Member
Rank
Member

Nice project! When USB mouse/keyboard or network is also working I am surely interested in making/buying one.

A CD-ROM emulator is certainly a killer feature but I guess a Pico would probably be under-powered for such a feature.