Previous Thread
Next Thread
Print Thread
Page 6 of 8 1 2 3 4 5 6 7 8
Re: BBC expansion devices WIP [Re: Pernod] #115755 08/25/19 01:41 PM
Joined: Apr 2012
Posts: 263
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 263
With the new IMAGE_PICTURE device I've started looking at Digitisers. There are three such devices for the BBC that I'm aware of:
- RH Electronics Video Digitiser (1MHz Bus)
- Watford Electronics Hand Scan (1MHz Bus)
- Watford Electronics Video Digitiser (Userport)

I'm currently looking at the RH Digitiser, as the original developer is available for technical queries.
[Linked Image from i.imgur.com]
Medium resolution (2 colours)
[Linked Image from i.imgur.com]
Low resolution (4 colours)
[Linked Image from i.imgur.com]
I'm having some row counter issues in other resolutions, so not ready for submission yet. But am impressed with the results so far.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Re: BBC expansion devices WIP [Re: Pernod] #115756 08/25/19 01:57 PM
Joined: Mar 2001
Posts: 16,421
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,421
Very cool!

Re: BBC expansion devices WIP [Re: Pernod] #116671 01/03/20 09:52 PM
Joined: Apr 2012
Posts: 263
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 263
Looking at supporting a couple of IDE interfaces, there are basically two implementations, 8bit http://www.retroclinic.com/acorn/bbcide/bbcide.htm and 16bit http://www.sprow.co.uk/bbc/beebide.htm.

I have them implemented and would like to add a couple of ADFS hard drive images to a softlist from http://www.retroclinic.com/docs/index.htm. The images are plain 8bit sector dumps where ADFS is 256bps and 16spt, this is the format supported by other BBC emulators. I suspect I'll need to pad each byte to 16bit with 0xff to make 512bps if converting to chd.

What's the most suitable/easiest way of supporting these images, convert to chd or add support for the format in harddriv.cpp?


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Re: BBC expansion devices WIP [Re: Pernod] #116672 01/03/20 10:25 PM
Joined: Mar 2001
Posts: 16,421
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,421
Both. CHD is preferable for softlisted images but it's also good to interoperate with other emulators. Plus it's easier to use a computer as a computer with a bare image.

Re: BBC expansion devices WIP [Re: Pernod] #116673 01/04/20 01:14 AM
Joined: Apr 2012
Posts: 263
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 263
I see other image formats supported by simply detecting a header and specifying the header size to skip. The geometry is then guessed in harddisk.cpp, based upon (filesize - header) / 512, this won't work for the ADFS images.

I can identify an ADFS image as they contain a 'Hugo' identifier and the sector count can also be extracted. The files are truncated though to only contain sectors containing data, they represent 496MB images but are only ~4MB in size. The 256 byte sectors would also be an issue in hard_disk_read, unless I set sectorbytes to 256. Doesn't look as though supporting the format can be done cleanly.

So moving on to converting to chd, assuming I've padded every byte with 0xff to restore 512 byte sectors. Would I create the chd with something like:
createhd -o hdd.chd -i hdd.dat -ib filesize -chs 7935,4,64 -ss 512


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Re: BBC expansion devices WIP [Re: Pernod] #116676 01/04/20 01:18 PM
Joined: Mar 2001
Posts: 16,421
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,421
All you really need to do in harddisk.cpp is change it so you pass the sector size to the non-CHD version of hard_disk_open() and then it should handle non-512 sizes perfectly fine.

CHD can also handle non-512 byte sectors; you'd use -ss 256 in that case. The goal here is to interoperate, and if other emulators don't pad the sector size MAME shouldn't either. For CHDs you're going to write to, the -c none option to CHDMAN is a good idea so it creates an uncompressed writable CHD.

Re: BBC expansion devices WIP [Re: Pernod] #116677 01/04/20 02:20 PM
Joined: Apr 2012
Posts: 263
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 263
I now have a chd created from a padded 512bps image. Now that I know that the device works I'll take another look at harddisk.cpp and also try a 256 byte sector chd.
Directory and free sectors of IDE drive:
[Linked Image from i.imgur.com]
This is the geometry reported by HDINIT:
[Linked Image from i.imgur.com]
The image is intended for a 1GB CF card, so can ask the community to confirm the CHS values of an actual card.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Re: BBC expansion devices WIP [Re: R. Belmont] #116684 01/05/20 01:09 PM
Joined: Apr 2012
Posts: 263
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 263
Originally Posted by R. Belmont
All you really need to do in harddisk.cpp is change it so you pass the sector size to the non-CHD version of hard_disk_open() and then it should handle non-512 sizes perfectly fine.

CHD can also handle non-512 byte sectors; you'd use -ss 256 in that case. The goal here is to interoperate, and if other emulators don't pad the sector size MAME shouldn't either. For CHDs you're going to write to, the -c none option to CHDMAN is a good idea so it creates an uncompressed writable CHD.

But the actual media does have 512 byte sectors, to write the images back to media requires a custom CFRESTORE tool. Dumping the media with something like WinImage would contain 16-bit data with every other byte being 0xff. Supporting the images as 8-bit 256 byte sectors would require hard_disk_read to inject the removed 0xff's into the buffer so that IDE commands return the correct 16-bit data. I'm still not convinced it's practical to support the images in this form.

The images that I'll be softlisting were distributed with the IDE interfaces for the user to write back to media for use. If I don't compress them they'll be ~1GB each, and I don't see any other softlisted computer HDD's for mac and pet uncompressed, though they do have writeable="yes" set.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Re: BBC expansion devices WIP [Re: Pernod] #116685 01/05/20 02:22 PM
Joined: Mar 2001
Posts: 16,421
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,421
Wow, those interfaces are a *gross* hack, and storing the images in not-actual-drive-contents-form is even grosser. None of the other 8-bit micro IDE interfaces I know about do anything like that.

Re: BBC expansion devices WIP [Re: Pernod] #116690 01/05/20 05:16 PM
Joined: Apr 2012
Posts: 263
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 263
Acorn never supported IDE devices for the BBC range, the interfaces were community developed much later in order to use cheaper IDE drives and CF adaptors. The later IDE interfaces do support full 16-bit data transfer but am not aware of any applications that required it. The Acorn Advanced Disc File System (ADFS) originally supported floppy and SCSI drives only but was later community patched for IDE support. The other emulators date back to when bandwidth was an issue and PC tools were already available to manipulate ADFS floppy images. The ADFS IDE images are identical to the floppy images, just many more sectors, so probably made sense at the time to maintain compatibility with existing tools and minimise bandwidth for downloading them.

If harddisc images were converted to an internal MAME format like floppies and cassettes then supporting the format would likely be trivial. But as there are only a handful of images out there it's not a major issue to pad and convert to chd.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Page 6 of 8 1 2 3 4 5 6 7 8

Who's Online Now
2 registered members (AJR, Luengo), 359 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,734
Posts114,832
Members4,879
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3