FloppyBuilder evolution

Anything related to the tools Tap2Wav, Tap2CD, Tap2Dsk, Sedoric Disc Manager, Tape Header Creator, WriteDsk, and generaly speaking tools related to the management of Oric data files and devices.
User avatar
Chema
Game master
Posts: 2262
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: FloppyBuilder evolution

Post by Chema » Thu Feb 15, 2018 9:21 am

Sounds really interesting, but I did not understand everything :)

You say it boots in 8D, but what does 'the image need to be stripped to plain sector data' mean? Is it that the same image won't work for the three operating systems?

Also the limitation in size is really stringent... Why only 140Kb of data? Is it because 8D does not know how to manage more? Is it due to the hardware limitations in the 8D controller (which I know nothing about)?

Two more questions:
- Did you add code for reading/writing sectors and on-the-fly decompression as with Microdisc?
- Are you using my latest modifications to the code which support Jasmin? I think I have them updated in Blake's 7 sources in the repository, but the original version did not work with Jasmin.

As I previously said, another important thing here would be make the disc bootable in Telestrat aswell. But this seems impossible with 256-byte sectors (it needs a 0 where the Microdisc needs a 1, and with 512 bytes a dirty trick could be done, but not with 256-byte sectors). Fabrice sent me a small Telestrat program which could be used to boot the game disk, but it is a separate program, and using it is a bit cumbersome...

Now that I mention it, I should upload it somewhere, so Telestrat users can actually play Blake's 7.

User avatar
Dbug
Site Admin
Posts: 2662
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: FloppyBuilder evolution

Post by Dbug » Thu Feb 15, 2018 9:55 am

Regarding sector size, there's nothing that forces us to use the same number of sectors on all tracks.

It's perfectly possible to use 512 bytes per sectors on the boot track, and 256 bytes on the rest.

User avatar
iss
Squad Leader
Posts: 643
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: FloppyBuilder evolution

Post by iss » Thu Feb 15, 2018 10:59 pm

@Chema: 8D-FDC and DOS-8D were created to be compatible with Apple ][ Disk floppy disks - 5.25", single side, 35 tracks, 16 sectors/track, 256 bytes/sector. There are many image file formats for these disks, but the most simple one is the 'DSK'. It stores only the real data from sectors without any info about the address fields, gaps, etc. When I added support for 8D-FDC to Oricutron I used this format just because its simplicity and until now there is no single demand for something more complex. Now I use FloppyBuilder to create a DSK file with 1/35/16/256 geometry. It runs perfect* in Oricutron with Microdisk and Jasmin FDC, but for 8D-FDC Oricutron requires the 'other' type of DSK and I use a simple tool to extract only the plain data from sectors.
Maybe it's little bit confusing because both images are DSK and use the same file extension '.dsk'....
* Actually in Oricutron was a bug in DSK loading routine, which I fixed and I will commit the changes.

For now the decompression is not added, thanks to remind me for it :).
I saw your modifications, but I didn't merged them... it's on my todo list.
At end, I didn't understand the problem with Telestrat and 256/512 bytes mystery...
I'm curious and this is very good reason to start using my Telestart(s):mrgreen:.

User avatar
iss
Squad Leader
Posts: 643
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: FloppyBuilder evolution

Post by iss » Sat Mar 31, 2018 7:18 pm

testfbs.png
testfbs.png (10.11 KiB) Viewed 2424 times
Attached zip file contains little demo demonstrating the Tripple-Bootability of FloppyBuilder :).
  • testfbs.dsk - Oricutron* + Microdisk or Jasmin
  • testfbs.dsk.dsk - Oricutron + Pravetz FDC
  • testfbs.dsk.nib - Euphoric** in Pravetz mode
The '.dsk.dsk' and '.dsk.nib' files are generated from testfbs.dsk with the tool dsk2dskii.
You can find its source in the archive too (dsk2dskii.c). The tool simply extracts 256 bytes from every sector and writes them to new image.

Currently reading with Pravetz FDC is somehow slow and I don't know why, but I hope to fix this soon.

The image is limited to 1 side, 35 tracks, 16 sectors and this is according the specs of 5.25" Apple][ DISK][ floppy drive.
I don't know how many people actually are using such floppy drives today with Oric and Pravetz FDC but I think they are very close to zero :). So I don't see problem to break the limit and set the tracks to 80.

EDIT: find updated version below.
_____
* if you get error try an Oricutron developers build announced here.
** I found bug in Euphoric emulation of Pravetz FDC and I have get in touch with Fabrice Frances to ask him for fix.
*** testfbs.dsk image works in CLK emulator too ;).
Last edited by iss on Wed Apr 04, 2018 9:25 am, edited 3 times in total.

User avatar
Chema
Game master
Posts: 2262
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: FloppyBuilder evolution

Post by Chema » Sat Mar 31, 2018 9:00 pm

Sound interesting... I am not near my computer these days, but I will have a look soon.

Have you added my changes in the loading/saving code? They are not yet in the official sources, but in the Blake's 7 sources.

They support Microdisc and Jasmin on emulators, cumulus (which has a bug in the firmware), Telestrat (though you need an additional program to make it boot) and real or Gotek/Hxc floppies... (Jasmin real hard yet not tested).

User avatar
iss
Squad Leader
Posts: 643
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: FloppyBuilder evolution

Post by iss » Sat Mar 31, 2018 9:45 pm

I didn't know that B7 contains your updated version of disk i/o code (maybe I missed your post).
I'll try to get synchronized with it asap (which means lot of work...).
About Telestrat I think I understand what the problem is - it requires first sector to be 512 bytes, right?
If so, this is related to Telemon cartridge then why not to create custom ROM cartridge which reads 256 instead of 512 bytes and use it in place of Telemon, does this make sense?

User avatar
Dbug
Site Admin
Posts: 2662
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: FloppyBuilder evolution

Post by Dbug » Sat Mar 31, 2018 10:13 pm

The easiest would be to have the first TRACK of the floppies be in 512 bytes per sector, and the rest of the floppy be in 256 bytes.

User avatar
iss
Squad Leader
Posts: 643
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: FloppyBuilder evolution

Post by iss » Sat Mar 31, 2018 10:21 pm

Unfortunately with 512 bytes sector 8D boot ROM will not boot :(.

User avatar
Chema
Game master
Posts: 2262
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: FloppyBuilder evolution

Post by Chema » Sat Mar 31, 2018 11:23 pm

No, no. 256 byte sectors are ok for Telestrat, but it expects a 0 where the Microdisc expects something different from 0 to boot.

Fabrice found a trick using 512 byte sectors to solve this, because one machine will read only the first 256 while the other will overwrite those with the second 256 bytes.

I know no more details.

What Dbug says is perfectly possible, but I am not sure it is worth the effort. Different versions could be built.

Oh, and, btw the alignment bug of the Telestrat controller might exist in the first Microdiscs. Or that is what Fabrice told me.

User avatar
iss
Squad Leader
Posts: 643
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: FloppyBuilder evolution

Post by iss » Sun Apr 01, 2018 10:33 pm

Well, attached is the updated version of the demo.
Now it's QuadroBootable - Microdisk, Jasmin, 8D and Telestrat!
TeleBoot-1.0.jpg
In the archive (together with described images in my previous post) you will find 'TeleBoot.rom'.
Use this ROM file as TeleBank7 in Oricutron.cfg or Euphoric.ini (leave other banks empty).
I've tested all possible combinations of Orics and FDC's and everything seams to work OK!
Pravetz FDC still slow, but I think I found the problem and will fix it asap.
testfbs.zip
(99.13 KiB) Downloaded 48 times
Here is how B7 runs on Telestrat with TeleBoot.rom in Euphoric.
The official Blake's 7 (v1.1 - English) freezes as on the left picture.
The B7en-1.2 from Chema's post related to interleave works perfect (right picture)!
B7.jpg
Please, test and give feedback.

PS. I'm sorry to being stupid, but I really didn't understand where is the problem with Telestrat and Microdisk :).
Last edited by iss on Wed Apr 04, 2018 9:27 am, edited 1 time in total.

User avatar
Chema
Game master
Posts: 2262
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: FloppyBuilder evolution

Post by Chema » Mon Apr 02, 2018 10:38 am

iss wrote:
Sun Apr 01, 2018 10:33 pm
In the archive (together with described images in my previous post) you will find 'TeleBoot.rom'.
Use this ROM file as TeleBank7 in Oricutron.cfg or Euphoric.ini (leave other banks empty).
I've tested all possible combinations of Orics and FCD's and everything seams to work OK!
Pravetz FDC still slow, but I think I found the problem and will fix it asap.
testfbs.zip

Here is how B7 runs on Telestrat with TeleBoot.rom in Euphoric.
[...]
That is strange, because I am quite sure that version was tested in a Real Telestrat and it worked. Hummmm... in any case all the work done under the guidance of Fabrice to produce version 1.2 seem to work much better :) I did not officially release this version because we are still hunting typos and Jasmin has not been tested on real hardware, but the routines are much more reliable now and they should work in any hardware combination, except the Pravetz, that is, which is still unsupported.

I guess what you did with the TeleBoot.rom is similar to what Fabrice did in the two disks I am attaching here. They include small programs which can be used to make Blake's 7 disk boot on a Telestrat. There is a version for those with the Stratoric cartridge and another one for Telemon (sorry if I am not naming the thing correctly here, I am a complete disaster when it comes to Telestrat)
stratoric_reboot.zip
(42.61 KiB) Downloaded 42 times
rebooter.zip
(32.55 KiB) Downloaded 45 times
And, no, you are not stupid :) I completely failed to explain it, simply because I don't understand it either. The first byte of the first sector in track 0 should be 0 or Telemon won't boot the disk, while this same byte is NEVER zero for Microdisc+Atmos configurations.

So basically you cannot satisfy both conditions except whit Fabrice's Fantasmagoric trick. The thing is that, due the implementation of the loading code in Microdisc, Jasmin and Telestrat eproms, if you use 512-byte sectors, the Telestrat will load the second half of the sector overwriting the first part (I guess it uses indirection with y register and it overflows back to #0), while the Microdisc doesn't, so you can satisfy the non-zero byte for Microdisc and put the necessary zero (and other data) in the second 256-byte chunk, so after loading, Telemon boots the disk.

But I don't personally care if different versions of the game should be created. Supporting all the possible combinations on a single disk image is exhausting ;) What I really wanted is to keep just one dsk image for Microdisc, Cumana (Jasmin is a nice addition), or any modern device acting as such, and Oric 1/Atmos.

It is much better, in my opinion, that the code works with the bug in the Cumulus firmware, than that it supports the Jasmin in the same version, for instance. I could not find a single Orician with a Jasmin to test anyway.

I was tempted to remove all the fuzz needed to keep access to registers aligned to avoid the Telestrat bug for the same reason, and keep it only in a future Telestrat-only version, but when Fabrice told me that some old Microdiscs may have the same issue, I decided otherwise.

Another source of problems and big-size code was the attempt to drive the sector reading and writing with polling instead of using IRQs. Of course that is great for keeping music sounding (though with real devices as interrupts need to be disabled in critical sections, there are ugly pauses), but it complicates things a lot.

User avatar
Dbug
Site Admin
Posts: 2662
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: FloppyBuilder evolution

Post by Dbug » Mon Apr 02, 2018 2:59 pm

Chema wrote:
Mon Apr 02, 2018 10:38 am
But I don't personally care if different versions of the game should be created. Supporting all the possible combinations on a single disk image is exhausting ;) What I really wanted is to keep just one dsk image for Microdisc, Cumana (Jasmin is a nice addition), or any modern device acting as such, and Oric 1/Atmos.

It is much better, in my opinion, that the code works with the bug in the Cumulus firmware, than that it supports the Jasmin in the same version, for instance. I could not find a single Orician with a Jasmin to test anyway.
Imo, it's mostly for the greater good: Be able to release a system that pretty much work on any Oric system around there. Not specifically for Blake's 7 in particular :)

It just happens you have the most advanced piece of software ever made on the machine, so it's a nice test bench :)

User avatar
Chema
Game master
Posts: 2262
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: FloppyBuilder evolution

Post by Chema » Tue Apr 03, 2018 8:39 pm

Dbug wrote:
Mon Apr 02, 2018 2:59 pm

Imo, it's mostly for the greater good: Be able to release a system that pretty much work on any Oric system around there. Not specifically for Blake's 7 in particular :)

It just happens you have the most advanced piece of software ever made on the machine, so it's a nice test bench :)
Ha ha, okay, I see the point. The only issue I see is, then, the Telestrat boot. If you want the disk to be universal, you need the first sector to be 512-bytes to use Fabrice's trick. Once you move into that area, you can either have the first track with 512-byte sectors and either not use it, or make something strange so the code handles that sector size for track 0, or change everything to use 512-byte sectors.

Then you have the Pravetz support, which is a whole unknown area for me :o

But first we can generate a new version of FloppyBuider with the new code. The only thing missing, imo, is that I am including the disk flashing thingy, which should be implemented with a callback, for instance, to avoid making it part of the code.

I know Fabrice changed writedsk so it keeps the interleave, so that is solved!

User avatar
iss
Squad Leader
Posts: 643
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: FloppyBuilder evolution

Post by iss » Fri Apr 20, 2018 10:48 pm

I'm advancing slowly in FloppyBuilder for 8D-FDC hardware.
Here you can see optimized version of my test demo from previous post
running on real 8D FDC. It's faster than in Oricutron :).

I'll make some code cleanup and will post sources and all technical details about the integration in FloppyBuilder.
We can have then discussion if it's worth ... for me it's lot of fun to use 8D FDC and to explore its secrets and nice tricks.

User avatar
Chema
Game master
Posts: 2262
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: FloppyBuilder evolution

Post by Chema » Fri Apr 20, 2018 11:45 pm

So many new developments lately... How nice! Congrats!

Post Reply