General Stuff(tm)

Blogs & guides and tales of woo by forum members.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

And now, with the addition of a tiny switch and some wires, I can run either tethered to the Pi400 or completely untethered. :-)

IMG_2899.jpeg
You do not have the required permissions to view the files attached to this post.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

Oh, that's wierd! I looked back at my code and somehow some of the files had reverted to older versions! I guessing it's because the Pi400 when it shuts down pulls the power very abruptly and it doesn't give time for the external USB hard drive I'm using to finish writing its data, then when fsck runs at the next boot it invalidates the journal, leaving the drive in a previous state. That's nasty.

I had to re-implement the bus waits again.

I also added some code to give error conditions if the SD card disappears.

With respect to format, I think I'll go back to the drawing board and implement it exactly how the flow chart in the datasheet says it should, including writing to the virtual disk.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

This afternoon I built another of the HD emulator boards, this time in the daughter board configuration.

Amazingly it worked first time!

I had to add one bodge wire to the RAM card to bring the ALE signal up to a previously unused pin on the expansion connector but there were otherwise no changes required.

It all fits except for the internal address bus pull-up bodge which I will have to desolder and somehow fit the other way up as at the moment the case won't fit.

IMG_2906.jpeg
IMG_2907.jpeg

I ran RAM tests etc. and everything checks out, though I can't get GEM to work properly from the hard drive. It's thinking that there's a 200 line screen and there are other oddities which don't happen if run from a floppy. I need to try to investigate.

As well as bringing the machine up to its full 768K of RAM the RAM board also allows me to use a colour display (Spectrum 128K compatible RGBI socket).

IMG_2908.jpeg

With this colour scheme the machine could almost be an Amstrad CPC464. :-)
You do not have the required permissions to view the files attached to this post.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

OK, I'm getting corruption again with the new set-up. I'll have to try extending the wait loop after the selected signal is asserted.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

Don't you love it when you spend more time debugging your tools than actually getting stuff done?

I've been hitting my head against the wall with "Bruce's C Compiler", or rather than the MSDOS minimal library. Let's say that open with truncate works but opening read-only doesn't.

Anyway, what I was trying to do was to write a file writing test program to verify reads and writes using a similar methodology to RAM testing. I'm limited a bit by BCC only supporting "small model" real mode executables so all the code and data must fit into a single RAM segment, meaning that my buffer of reading and writing has a maximum size of 32K. Still, this is four times the size of HD system's buffer and four tracks of the virtual disk so it should exercise all the CHS addressing elements, especially as I'm currently writing four of these blocks and then reading them back.

Anyway, I've got it mostly working, other than the random read routine as that wants to open the test file read only to use the previous test's output.

Can I get things to fail and generate corruption? Erm, can I heck! *sigh*
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

Well that's a useless compiler then.

Reads are not working. They're silently doing nothing. Looks like a bug in the assembler to call MSDOS, at least for version 2.11.

*sigh*

That's the only 8086 compatible C compiler which can produce MSDOS execuatbles I can find on-line. Everything else requires an 80386 and above.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

Managed to get a working version of Borland Turbo C++ 3.0 running within DosBox...

Then the floppy drive I was using to transfer data onto the Apricot decided that it no-longer wanted to read disks written by other drives, only itself.

I think I'll give up for the day now.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

Well, Borland Turbo C++ is a complete nightmare. Type conversion over assignments and in tests seems random and mostly broken. Don't expect printf() to do the right thing if the type you're typing to print isn't sizeof(int).

Sometimes assignment of a value from an unsigned long to an int will work, sometimes you just get the upper half of the value and it can change between one line and the next.

Oh, and don't expect lseek() to work.

Then there's the problem that you have to open files in binary mode with "|O_BINARY" otherwise data goes missing.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

After much searing and doing all sorts of gymnastics I finally got a working file test program written in Borland Turbo C++ 3.0. Finally!

Then it was trying to get the file onto the Apricot time.

The real floppy I have connected doesn't want to read disks properly. You can get a directory listing but read a file and things go wrong with bad sector or even can't find a sector. So, on a whim I copied the file onto the TT, reformatted the floppy as single sided and wrote the file back. Hey-presto! That worked. So, the real floppy (which is drive 1) can't read double sided disks yet the Gotek (which is drive 0) has no problems, which is a bit nuts.

Anyway, I ran the tester, which writes four blocks of 16K (originally it was 32K but Borland C couldn't do unsigned ints > 32767 a lot of the time) and then reads them back. Finally it does a random read from the "write my own address" file to test seeking.

The result:

IMG_2909.jpeg

It looks like I don't have file corruption. 16K writes will be writing two tracks over at least two heads and the whole 64K will be using two cylinders, so that tests all three parameters, sectors, heads and cylinders.

This is positive news.
You do not have the required permissions to view the files attached to this post.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: General Stuff(tm)

Post by stephen_usher »

Right. Back to trying to get the WD1010 format command working tomorrow.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.

Return to “MEMBER BLOGS”

Who is online

Users browsing this forum: ClaudeBot, LarryL, rmahlert, semrush [bot] and 19 guests