• Please review our updated Terms and Rules here

optromloader: IBM PC/Clone 8086+ floppy-loading of option roms.

dmac

Experienced Member
Joined
May 18, 2020
Messages
52
A few days ago, I burned the wrong image into my last EPROM, and was left unable to get XTIDE Universal BIOS working on my 486. At least until I get an eprom eraser or more roms.

I looked for ways to load the option rom into memory instead, and the solutions I found were not great.

So I wrote my own: https://github.com/rvalles/optromloader

It works great on the 486, and also works great in emulated PC/AT/XT and clones. This includes PCem's 5150.

But I have no real <32 bit hardware to try it on. There's hope somebody here will.
 
Last edited:

Theoryboy

Member
Joined
Sep 13, 2020
Messages
36
Location
Ireland
I tried to use this but I am a noob and missing some information. So for windows whats needed to make this?
I have fasm , I installed make, but I get

>make

fasm -d bios_drive=0 -d build_date="`date -u +%Y%m%d%H%MZ`" -d readblock_retries=7 -d sectors_per_track=18 optromloader.asm optromloader18
flat assembler version 1.73.28
usage: fasm <source> [output]
optional settings:
-m <limit> set the limit in kilobytes for the available memory
-p <limit> set the maximum allowed number of passes
-d <name>=<value> define symbolic variable
-s <file> dump symbolic information for debugging
make: *** [Makefile:15: optromloader18] Error 1
 

dmac

Experienced Member
Joined
May 18, 2020
Messages
52
I tried to use this but I am a noob and missing some information. So for windows whats needed to make this?
I have fasm , I installed make, but I get

>make

fasm -d bios_drive=0 -d build_date="`date -u +%Y%m%d%H%MZ`" -d readblock_retries=7 -d sectors_per_track=18 optromloader.asm optromloader18
flat assembler version 1.73.28
usage: fasm <source> [output]
optional settings:
-m <limit> set the limit in kilobytes for the available memory
-p <limit> set the maximum allowed number of passes
-d <name>=<value> define symbolic variable
-s <file> dump symbolic information for debugging
make: *** [Makefile:15: optromloader18] Error 1

I've never tried to build it on Windows (I mainly use Linux).

My guess is that the build date part doesn't become a date (on linux, it would get replaced by the output of the command that's `wrapped like this`) . You can just hardcode that parameter.

I ran that date command now, it did output 202109261717Z, so you can just edit the makefile, and replace the date= line in that format, like this:

Code:
date = \"202109261717Z\"

Else, you can just put any text there really, as long as it is the same length or shorter.

Worst case scenario, you can use the binary build and just concatenate optromloader18 (or whatever appropriate) with the optrom image and pad to floppy image size.

I'll try and boot windows sometime soon, to see if I can improve the process without breaking the Linux build.
 
Last edited:

Theoryboy

Member
Joined
Sep 13, 2020
Messages
36
Location
Ireland
Perfect thats what I needed. I just ran this command
for a 360K floppy

fasm -d bios_drive=0 -d build_date="202109261717Z" -d readblock_retries=7 -d sectors_per_track=9 -d pad_to_bytes=368640 -d include_optrom="optrom.bin" optromloader.asm fd360.img


Thanks for this, it will be very useful
 

Attachments

  • photo63675.jpg
    photo63675.jpg
    66.8 KB · Views: 35

dmac

Experienced Member
Joined
May 18, 2020
Messages
52
Perfect thats what I needed. I just ran this command
for a 360K floppy

fasm -d bios_drive=0 -d build_date="202109261717Z" -d readblock_retries=7 -d sectors_per_track=9 -d pad_to_bytes=368640 -d include_optrom="optrom.bin" optromloader.asm fd360.img


Thanks for this, it will be very useful

Good to hear! I will try and make the build JustWork on Windows too.

Note your screenshot shows 1.44M drives. You'll probably want to try with an emulated 5.25" drive and the 360K floppy, too ;)

I also do try a bunch of PCem targets before each release, to ensure nothing is broken. It does even work on emulated IBM PC (5150), as long as it's the 360K floppy.
 
Last edited:

Theoryboy

Member
Joined
Sep 13, 2020
Messages
36
Location
Ireland
Here its working on real hardware on my Tandy, I took the eeprom out of my card and it booted XTIDE and CF fine from 720K floppy.
DISK COPY FAST would not write the floppy as it through it was a virus.
rawrite3.com wrote the image to floppy perfectly.
 

Attachments

  • photo63683.jpg
    photo63683.jpg
    125.3 KB · Views: 22

dmac

Experienced Member
Joined
May 18, 2020
Messages
52
Here its working on real hardware on my Tandy, I took the eeprom out of my card and it booted XTIDE and CF fine from 720K floppy.
DISK COPY FAST would not write the floppy as it through it was a virus.
rawrite3.com wrote the image to floppy perfectly.

Very nice! Date isn't YYYY-MM-DD (ISO, pet peeve...), but great otherwise.

Interesting re: DISK COPY FAST. I suppose it would with anything that has a non-standard DOS bootblock :). I use FDIMAGE by Robert Nordier, which is included in most i386 FreeBSD install media, in the tools directory. Find version 1.5 attached to this post.
 

Attachments

  • fdimage.zip
    10.9 KB · Views: 6
Last edited:

dmac

Experienced Member
Joined
May 18, 2020
Messages
52
As promised, I rebooted and fixed Windows build.

Make should work now. :cool:
 
Last edited:

pearce_jj

Veteran Member
Joined
May 14, 2010
Messages
2,806
Location
UK
A few days ago, I burned the wrong image into my last EPROM, and was left unable to get XTIDE Universal BIOS working on my 486. At least until I get an eprom eraser or more roms.

I looked for ways to load the option rom into memory instead, and the solutions I found were not great.

So I wrote my own: https://github.com/rvalles/optromloader

It works great on the 486, and also works great in emulated PC/AT/XT and clones. This includes PCem's 5150.

But I have no real <32 bit hardware to try it on. There's hope somebody here will.
This is a brilliant tool. Thank you. Used to test XTIDE Universal BIOS on a Yamaha C1 (286 based luggable). Worked perfectly.
 

VERAULT

Veteran Member
Joined
Jan 30, 2012
Messages
6,257
Location
Connecticut, USA
Is it possible to load multiple option roms? I have an early model 5150 which is basically useless as it blocks maskroms. So I would like to use XTIDE rom and possibly a VGA rom (off my 8bit vga card) as I have a vga monitor on my workbench and this 5150 wont display via this card.
 

Makefile

Member
Joined
Jul 13, 2020
Messages
42
Location
MD, USA
Nice. I've thought about how such a program would work, but never dug into the implementation details.
The catch, of course, is that unlike a real option ROM, the ones loaded this way gobble up conventional memory. But it's a great way to test an XT-IDE BIOS for example and see if it's configured right.
 

Makefile

Member
Joined
Jul 13, 2020
Messages
42
Location
MD, USA
Is it possible to load multiple option roms? I have an early model 5150 which is basically useless as it blocks maskroms. So I would like to use XTIDE rom and possibly a VGA rom (off my 8bit vga card) as I have a vga monitor on my workbench and this 5150 wont display via this card.

I saw your other thread, is your issue that you already have the option ROMs on cards and ready to go in your system, and you just choose not to update your BIOS to search for and execute them? In that case it should be possible to write a similar tool to this that doesn't cost you conventional memory.
 

VERAULT

Veteran Member
Joined
Jan 30, 2012
Messages
6,257
Location
Connecticut, USA
I saw your other thread, is your issue that you already have the option ROMs on cards and ready to go in your system, and you just choose not to update your BIOS to search for and execute them? In that case it should be possible to write a similar tool to this that doesn't cost you conventional memory.
Yes thats pretty much it. I want to keep the machine orginal, but get as much out of it without altering it.
 

dmac

Experienced Member
Joined
May 18, 2020
Messages
52
The catch, of course, is that unlike a real option ROM, the ones loaded this way gobble up conventional memory.

Note that, while using conventional is definitely the easiest and the default, it is possible to use high memory (640 --> 1024).

Refer to optromloader's documentation.
 

Jackson

Experienced Member
Joined
Jan 11, 2015
Messages
340
Location
Raleigh, NC
This will work great with my XT for hacking the Future Domain SCSI BIOS to fix overriding the floppy controller card and allow for booting from removable drives.
 
Last edited:
Top