View Full Version : uIDE on the Superbrain

April 12th, 2017, 07:17 AM
Greetings Superbrain owners!

I'm rather pleased to tell you that the Z80 Shim board for the uIDE-8 interface (http://www.cpcwiki.eu/index.php/UIDE_Universal_IDE_adapter_cards_for_Z-80_computers) does indeed fit in the Superbrain's case. I had previously thought that space is rather limited above the motherboard but as the case curves up at that point, it opens out nicely. Behold!


That's a RHS shim sitting under the CRT with a Z80 fitted. I was able to fit the top half of the case easily, so this means a uIDE can be fitted internally.

Drivers will follow after I get mine working.


April 12th, 2017, 12:13 PM
All I can say is WOW! You've come a long way since I last looked and it was GuIDE. I'm as uselless now as I was then at assembly language etc so there was no chance of me writing my own disk format program for whatever z80 device I had at the time. I've been through the cpcWiki page, you make/buy the hardware and there are now drivers and software written for the cpc so that you can install a ide cf hard drive without having to code any drive parameters or format programs? Is that correct? Is the same thing planned for the Superbrain? Really must get a move on repairing mine to a working state - a hard drive with modern components really adds intrigue to interest!

April 12th, 2017, 12:38 PM
Hi Alan

The CPC version is called uIDE-16 and the software project (drivers for Amstrad CP/M 3) is on hold for the time being, because I can't work out how to extend the dodgy Locosoft CP/M implementation.

UIDE was always meant to be universal, that's why the IO base address is programmable. For the Superbrain, I will produce a driver suite based on the xdriver v1.9, which I wrote for the TRS80 Model II under Lifeboat CP/M 2.2. All the features of this package should be usable on the Superbrain. You can read about it here http://www.vcfed.org/forum/showthread.php?55487-TRS-80-Model-II-Lifeboat-CP-M-LoTech-IDE-Adapter-Extended-Driver-v1-9

Of course, I need to get my Superbrain running before I can write the drivers for it, but I can tell you from experience with the Model II and Amstrad PCW that the experience is light years ahead of a system with only two floppies.

April 12th, 2017, 01:35 PM
- Just watched your youtube videos, i get the idea. I'd be happy with just one logical drive, let alone a - p!

April 13th, 2017, 01:44 AM
With uIDE-8 and a 128MB IDE device like a DOM, C: - P: are a given, providing you have allocated enough upper RAM with MOVCPM. But even if (for example) you only have enough memory for C: D: and E:, you can still use XMAP.COM to switch in different IDE partitions (including any on a slave drive) to the three logical drive letters that are available. You can do this without rebooting, at will, and you can save the settings down so they are available next time you load the xdriver. There is no additional cost, it is all part of the xdriver v1.9 suite.

Mapping an IDE partition to B: works, too; although you lose access to the floppy.

Mapping an IDE partition to A: may or may not work; it depends on how the Superbrain BIOS implements warm boot. I found that on the TRS-80 Lifeboat BIOS, warm boots continued to work from the floppy drive, irrespective of the drive mapping, so A: was available as an IDE slot.


June 14th, 2017, 07:23 AM
OK, now my Superbrain is working properly (http://www.vcfed.org/forum/showthread.php?57124-S-u-p-e-r-b-r-a-i-n&p=464505#post464505), it's time to get this party started - proper, like.


Trial fitting uIDE-8 to the Superbrain. Left hand or right hand shim will work.


Running the xtest program. The uIDE is in its default configuration (I/O address range C9-CF).



Let's see if we can format the drive..



This is the first stage of the uIDE Superbrain port - to check that the hardware is compatible, and that we can read from / write to the IDE device (writing isn't proven but the format looks promising). I need to try and remember how to find out all the parameters I need for patching the xdriver into CP/M. I won't be using CPU2 to implement the uIDE drivers, they will be added as bog standard CP/M 2.2 patches and run from CPU1, unless there is an incompatibility (usually caused by interrupt processing).

As the ROM is so well documented, I will also implement "boot from uIDE" for the first time (eventually), but you can expect the first release to boot from floppy. This is likely to be a while, but at least now I have a machine to develop with!


February 13th, 2019, 10:05 AM
Fellow Superbrainers

After a bit of a long delay, I have some progress to report. I've reverse engineered the ROM 1st stage boot loader code and a Superbrain CP/M BIOS called MicroMods SuperBIOS for which I had source. I've written a stage 1 boot loader and burned it to a ROM. Installed it and I have a uIDE boot prompt (see picture). Hit "F" and the Superbrain boots from the floppy drive as normal. Any other key and the ROM accesses the uIDE drive, but as there is no second stage boot loader on there yet, it doesn't get further.


All sources - ROM, Z80 CCP, BDOS and BIOS are assembling. Just need to work out what the second stage boot loader is doing and write a uIDE variant, then stick it on a DOM along with the CCP,BDOS and BIOS and we should be cooking with gas. Oh, the BIOS does need extending for uIDE access but that should be easy enough now I have annotated source code.

Nearly there... woop!

C'mon Alan, you need to fix your 'Brain!


(Credit also goes to Warren W Gay for his original ROM disassembly and J B Hawkes for his SuperBios v1.7 disassembly. Kudos!)

February 13th, 2019, 12:06 PM
I don't care - fixed or not fixed, just sell me this thing!!!!

Formatting a HD on a superbrain :D :onfire::onfire::onfire::jumping3:

February 13th, 2019, 12:20 PM
Formatting the drive was so 2017, Alan (check the date on that post)..

I will make them available when the new CP/M is ready, not before... have patience... but it's on its way!

Meanwhile, get fixing!

February 13th, 2019, 12:26 PM
Capacitors for the vdu driver board are here, just waiting for some free time to carry on with it....:whatthat:

It's weird reading your own posts from years ago!

February 19th, 2019, 08:43 AM
After a bit of a slog I have the Superbrain booting from the uIde card. It still access a: though, because it's logging the disk in, and it crashes on warm boot for some reason. But it cold boots...

February 19th, 2019, 09:38 AM
OK, fixed. Boot from uIDE, warm boot from floppy. Now to update the BIOS with drivers..

February 19th, 2019, 01:39 PM
Great progress Jon.

February 20th, 2019, 04:53 AM
Thanks - the uIDE warm boot is working now. Next up: Merge BIOS and hidden BIOS. The cs30bios.asm file is in 8080 so I need to convert to Z80 first. I found a converter to do this and it is a CP/M program, so I have to run it on the SB. Such retro goodness..

February 21st, 2019, 08:23 AM
Another update. I've merged the two BIOSes and removed all the hard coded addresses. Then changed the OFFSET value (this is the address all others are derived from, I guess it is called BIAS in the DRI documents) and rebuilt. Fixed a couple of left over hard coded addresses and reflashed the boot ROM. A couple of iterations later and it now boots from uIDE at the OFFSET, with a separate OFFSET for floppy boot. So this means that I can now relocate CP/M to make space for the uIDE drivers and ALV buffers.

Nearly there!

March 6th, 2019, 12:52 PM
(Yet) another update.

I seem to have it working - as of now it features:

Cold and warm boot from uIDE or floppy with a custom ROM
Access to three 8MB IDE partitions
Drive mapping (XMAP.COM is not ready yet, but I can change the map in the source code and it works) - gives access to all 16 partitions like the tech demo by assigning up to three of the 16 available logical drive names to a physical partition on the uiDE device.
Boot does not access floppy 1 - by virtue of mapping A: to uIDE partition 0 (the boot partition, but you could map it to another partition or even a floppy if you wanted).
Full floppy access, read and write
XFORMAT.COM and XTEST.COM already ready

So to all intents and purposes the difficult bit is done. There are still problems, though

I can't open more than 1K of space between the BIOS and hidden BIOS (this is where I locate the uIDE ALV buffers, hence the current limit of 3 partitions visible + the 2 floppy drives). If I try, it will not boot.
There is some memory still to be freed up. I see a ~700 byte gap between the end of hbios and start of config block. Pretty sure I can use this - if free it would allow access to another 3 uIDE drives.
Still need to write the utilities - XMAP.COM (exisits, but needs to read & write the boot sector and in-memory drive map) and CONFIGUR.COM.
There is a lot of code tidying to do and I could save more memory by refactoring some of it.
You need to map the A: drive to a uIDE partition (not necessarily the boot partition) if you want the boot process to not log the first floppy. This is because the BDOS makes an assumption about A: being the boot drive (or rather, the drive that is always guaranteed to be there). I'd need to mod the BDOS to stop this; then you could specify the initial drive in XMAP.COM and after boot the Superbrain would log that drive. So it'd be a bit like DOS - going straight to C:> (or any other drive you fancy).
More testing required...

All that said, I could release it now because the ROM is finalised. If you want to try it you will need a uIDE card plus Z80 RHS shim, a 40 pin IDC-IDC cable (same as a PC IDE cable) and a 128MB DOM. See http://www.cpcwiki.eu/index.php/UIDE_Universal_IDE_adapter_cards_for_Z-80_computers for details and prices. You will also need a ROM adapter board (if your Superbrain currently has a TMS2716 ROM fitted) and a 2716 EPROM plus something to program it with, although I am pretty sure that the "Superbrain guys" on here already have this.

There is a trade off here between number of instantaneous drives available and TPA size. With 3 uIDE drives the TPA is 52230 bytes; on a normal Compustar 30 floppy boot there are 53254, so 1K is lost to the uIDE ALV buffers. The Superbrain is already low on TPA thanks to its enormous BIOS (which doesn't even implement IOBYTE). I think it is due to the main CPU having to manage the screen and its escape codes.

I'll post a new video soon. Meanwhile, a picture to whet your appetites.


Yeah, A: really does have 7812k free.... :cool:

Oh, one more thing. This uIDE BIOS is based on the Compustar 30 stand alone BIOS (CS30CPM.COM) which is in turn based on the Superbrain QD BIOS 3.1. So it's 512 bytes per sector and 35 tracks on the floppy drives only, for the time being (DS/DD 360K per drive). Boot ROM is based on 3.1 (I think). I chose the CS30 BIOS as a starting point because unlike the QD BIOS it has keyboard auto repeat.

March 7th, 2019, 02:37 AM
Excellent work Jon.

I'll PM with my shopping list.

March 7th, 2019, 03:52 AM
You have a a Superbrain II don't you? It wont be compatible until I produce a SB II variant. Luckily, I have a SB II mainboard that I can use as a test bed.

March 7th, 2019, 04:04 AM
I have three Superbrains - two of which are SB II but my only current working one is the standard QD.
I also have a couple of PCW's that can benefit from the uIDE cards too - PM sent.

March 7th, 2019, 06:41 AM
Demo video here: https://www.youtube.com/watch?v=K73HavTM99U

Unrehearsed, unscripted and unprofessional. But you get the gist.

March 11th, 2019, 06:41 AM
Time for another update.

XMAP.COM, the utility I demonstrated earlier to assign uIDE drives to logical drive letters, is working. It can write a drive map to the BIOS (lasts until next cold boot) or boot track (lasts until you change it again).

XCONF.COM is a new version of the Intertec CONFIGUR.COM that works with the uIDE BIOS. Allows you to set BIOS configuration parameters (Serial port settings, screen refresh rate, keypad assignments, etc).

Up next:

Add a couple more uIDE ALVs so you can access 5 partitions at once. This should be possible without moving the CBIOS down because there are some unused gaps in the memory map.
Fix a bug in the time display that I seem to have introduced
Might need to make XMAP a bit smarter. At the moment it could allow an invalid map assignment to be made in command line editing mode.
Fix the issue that prevents me making more space for uIDE ALVs
Code refactor / tidy up


March 11th, 2019, 09:03 AM
Unfortunately I have to reply to myself, because I can't edit the last update (it times out after 15 minutes).

So, here's another update.

Now have direct access to 2 floppies, 6 uIDE partitions. Still only 1K of TPA used.
Added SLAVE drive support. You can now choose to access any six of 32 8MB partitions across two separate IDE devices (one configured as MASTER, one as SLAVE), using the drive mapper xmap.com.
Updated xconf.com (new ident messages)
Completed the refactor, sort of ;)

Just a few more improvements and it'll be ready to ship.

March 17th, 2019, 03:54 AM
Latest version is now v0.11: https://drive.google.com/open?id=1VyHVd_wvhW6o6_qjQrx_pjYCS9jnaxRn

New features:-

Adds optional cold boot auto command, use XSETCMD.COM to set it up
C: is the start up drive.
Shortened beep and keyboard repeat delay.
Pre-patched version of SUBMIT.COM (called XSUBMIT.COM), works from all drives.


March 23rd, 2019, 08:39 AM
After a brief interlude, during which the Superbrain's video board gave up and had to be repaired, I've made and uploaded a pair of no doubt excruciatingly bad demo videos on YouToobz. Watch, if you dare!



March 23rd, 2019, 09:12 AM
Try this: https://youtu.be/8hshdu2_P7Q

March 28th, 2019, 08:35 AM
Version 0.11a is released.


Has bug fixes:-

Boot ROM is proper 50Hz now
Fixed glitch on "3.1 Insert Diskette" message
Fixed the CP/M clock display bug

To use, burn the ROM file to a 2716 EPROM (or 2816 EEPROM), install in the Superbrain and put the image (.img) onto your IDE device. Boot, then KERMIT XSYSGEN.COM across and run it. The bug fixes are transferred to your IDE device. You might want to run XSETCMD.COM again, the command on the image is "TYPE CATALOG.TXT" (without the quotes).


Tom Peck
April 3rd, 2019, 05:35 AM
Just joined and looking for advice. Aged 81 I have just "unwrapped" 2 Intertech Superbrains which have been carefully stored. Both were used until 1991 and were in good order at that time. I have no knowledge or memory of the computers but they each have manuals, floppies etc.
I can take photos of all accessories but I need to have email contacts in order to sell them.
Any advice or help would be most helpful.
Tom Peck (Tom@scotours.co.uk)

April 4th, 2019, 08:12 AM
Mail sent. I can advise you on these machines, just ping me by reply.

April 4th, 2019, 09:48 AM
Any advice or help would be most helpful.

Hi Tom.

Knowing roughly were you are in the world would help any interested buyers.

I'm guessing based on your email address that you are in the UK, if so where about.

April 4th, 2019, 10:43 AM
Email also sent plus PM - just want a working 'Brain!! (Or another I can try and fix)

Just joined and looking for advice. Aged 81 I have just "unwrapped" 2 Intertech Superbrains which have been carefully stored. Both were used until 1991 and were in good order at that time. I have no knowledge or memory of the computers but they each have manuals, floppies etc.
I can take photos of all accessories but I need to have email contacts in order to sell them.
Any advice or help would be most helpful.
Tom Peck (Tom@scotours.co.uk)