• Please review our updated Terms and Rules here

How to setup a harddisk image for the FreHD auto menu option.

Hans01

Experienced Member
Joined
Feb 17, 2014
Messages
459
Location
Netherlands
Hi.

I have some problems with building a harddisk image to use on a Model 4P
with the new auto menu for the FreHD.

A normal autoboot harddisk is no problem, the only menu files that runs
are the four demo files packed with the FreHD.

I have study the hex images of the hd files and know all the meanings of
the bytes in the header of the file, but the files runs with a boot from a floppy but not
from the menu.
Yes, I have set the 08 byte to 1 for menu booting and the frehd.rom file in the root. :(

Please help me and I hope more users with a full step by step set of instructions. :cool:

Hans01
 
On the 4P, you need to have frehd.rom (like all other models) but also the modela.iii file on the SD-card. Without the later, the model 3 OS won't autoboot, and won't be presented in the boot menu.

-Fred
 
Ray, Fred thank you for the reply.

To Fred,
I have this files on the SD-Card.
But I have now 3 different copies of the frehd.rom and they all react different.

Version (1) supplied by Ian on his CD-Rom Seems to work, don't display version of loader and other info
Version (2) supplied by you (size 4K) seems to work oke, display all version info, use smaller characters.
Version (3) supplied by Ray, doesn't work at all, no menu showing, does only autoboot hard-01

To Ray.
Thank you for sending me all the files.
They are all for a model 3 (I have a Model 4P), but most of them seem to work oke.

LDOS-1 and LDOS-2 boot oke
LDOS didn't boot
CPM Oke
ND80MR3 oke.

What is new on the B version of vhdutl ?

I'am not successfull in creating a working bootable menu version of any operating system.
Some info speaks about 203 cyl. and other about 202 cyl. Some about 6 heads and some about 8 heads
I have used all parameters but no booting harddisk.

Please tell me what harddisk image you use and how you build it.
Mention the partitions you set up.
How you format them
How you set your system drive, how you use sysgen and use auto
Do you set byte 8 and 11 in the file header
What else do you do with the file to make ik work.

A lot of questions, but I think there are more users waiting for those answers.

Thanks in advance


Hans.
 
Hans:

I haven't tried Ray's image, but with the SD card image I am using, as provided by Fred and Ian, my 4P boots up as follows:
FreHD is in large graphics block characters on the top left. On the top right it displays:
Firmware 2.13 Loader 1.02
FREHD.ROM Ver. 0EF3H
TRS-80 Hard Disk emulator
Then there's a solid line across the screen and then 4 options:
CPM (CP/M ver 2.2)
LDOS3 (Model III LDOS ver 5.3.1)
LSDOS (Model 4 LS-DOS 6.3.1)
NEWDOS3D (Model III NEWDOS/80 ver. 2.5)

All 4 images boot, and the only abnormal operation I've noticed is that the first floppy access when using LSDOS grinds horribly, but subsequent operations are fine.

Howard
 
Hi Howard.

Yes, I have no problems using the images provided by Ian too.
Only some promblems with the floppy drives, I think it depends on the same problem as you mention.
The LDos 5 image doesn't support floppydrives. If I execute a non excisting command, both FDD's are activated at the same time.
I have tried to disable the drives and setup two new drives, without any success.

That is the reason why I want to build my own harddisk images and there starts the problem.
I can build a harddisk with 203 cylinders and 4 partitions, which can be used as a harddrive whem booted from a floppy without any problem.
But if I want to set the image for booting from the FreHD menu, the system crashes.


Hans.
 
What I have found so far.

Due to the special features of the Model 4P rom, the harddisk image is treated in a different way as the other
trs80 models.

To use the menu boot system of the FreHD, the hardisk image must be patched on the fly during the first use.
This is done by the FreHD boot module FreHD.ROM.

The harddisk header is read and a check is done for the boot byte ( 08 ) and the operating system is
checked by reading the value of byte 11.

A decision is made to get the right patch and load some data in a buffer. The patch is applied to the buffer
and the harddisk image is rewritten.

Now a boot from the FreHD menu is possible.

Where is it going wrong.

The files needed to be patched are BOOT/SYS and SYS0/SYS.
After a bad boot I checked my hd image file and no files were patched, so this is the reason
why it is not working.

If I use a preconfigured image from the distribtion CD-Rom everything runs like it should.

What could be the problem ?

1) In the modified C-Rom from the model 4P, could be some faulty code.
2) The frehd.rom makes a wrong decision and didn't patch the hd image
There are at least 3 versions of the frehd.rom available. What is in this case the right one.
3) There is something wrong with the hd image.
I have build at least 10 different versions in 3 different ways.
I have checked the header and compared it with many working images.
I don't see any problem.
4) There is something wrong with the LS-DOS6 system disk.
I have used different versions and the one which comes with the distribution CD-Rom.
5) The problem only exist with hd images that are new build, not with pre configured images.

As you see many questions but less solutions so far.
As it takes to much time to do everything over again, I do need some help or info from
a user who have met this problem too.

Hans.
 
1) In the modified C-Rom from the model 4P, could be some faulty code.

=> I don't think so. There is just a few bytes added, to detect FreHD and download from it.

2) The frehd.rom makes a wrong decision and didn't patch the hd image
There are at least 3 versions of the frehd.rom available. What is in this case the right one.

=> use the latest.

3) There is something wrong with the hd image.
I have build at least 10 different versions in 3 different ways.
I have checked the header and compared it with many working images.
I don't see any problem.
4) There is something wrong with the LS-DOS6 system disk.
I have used different versions and the one which comes with the distribution CD-Rom.
5) The problem only exist with hd images that are new build, not with pre configured images.

=> you probably use the wrong geometry. The auto-boot code is not 100% completed, and
currently the patching done to BOOT/SYS and SYS0/SYS is hard-coded for the "traditional" values
(coming from the original 4P patches). There is provision in frehd.rom so that the patch (again
done on-the-fly, in files loaded in RAM, the hard drive image is NOT modified) can use dynamic
values, placed inside the image header. The idea is that
1) you create your image, with LSDOS
2) you run VHDUTL(SETAUTOBOOT that would get the actual geometry of the drive, and writes
the magic parameters in the image header.
3) autoboot reads the image header, and gets the geometry, so it can properly patch the image.

As you discovered, (2) and (3) are currently missing. Looking for volunteers :)

You can download the source code from my website http://www.vecoven.com/trs80/trs80/download_files/FreHD_2.14.zip. Look in z80/frehd_rom/ldos631.asm

-Fred
 
Hi Fred.

Thank you for the very fast response.

>>>> 2) you run VHDUTL(SETAUTOBOOT that would get the actual geometry of the drive, and writes
>>>> the magic parameters in the image header.


This is from your site from the sourcecode for VHDUTL vers. 2.14
Code:
            INCLUDE VERSION.Z80
            
            DB      ' - Utilities for the FreHD Hard Drive Emulator',CR
MSGNOIF     DB      'Interface not found',CR
MSGUSAGE    DB      'Usage: VHDUTL ('
            IF TRSDOS
            DB      'GET,SET,'
            ENDIF
[COLOR="#FF0000"]            DB      'VER,DIR,MNT,[ADDR,VHD="",HALT,WP,CREATE,NFS])',CR[/COLOR]
But the command is not in it.

Hans.
 
Hi Fred.

Thank you for the very fast response.

>>>> 2) you run VHDUTL(SETAUTOBOOT that would get the actual geometry of the drive, and writes
>>>> the magic parameters in the image header.


This is from your site from the sourcecode for VHDUTL vers. 2.14
Code:
            INCLUDE VERSION.Z80
            
            DB      ' - Utilities for the FreHD Hard Drive Emulator',CR
MSGNOIF     DB      'Interface not found',CR
MSGUSAGE    DB      'Usage: VHDUTL ('
            IF TRSDOS
            DB      'GET,SET,'
            ENDIF
[COLOR="#FF0000"]            DB      'VER,DIR,MNT,[ADDR,VHD="",HALT,WP,CREATE,NFS])',CR[/COLOR]
But the command is not in it.

Hans.

That's exactly what I wrote "As you discovered, (2) and (3) are currently missing. Looking for volunteers".

-Fred
 
Fred:
What do you mean by looking for volunteers?
Anything I can help with?
Howard
 
Fred:
What do you mean by looking for volunteers?
Anything I can help with?
Howard

Volunteers to write the missing code. The frehd_rom code contains a "patch" routine, which has the capability of patching memory with bytes coming from the Reed header . Currently, this is not used, and hard-coded values are used (sector per logical cylinder, sector per granule, some of the DCT bytes). Ideally, these parameters should come from the Reed header, and should have been placed by a utility. And this must be done per-OS, since different OS require different patches. Intimate knowledge of the OS is required...

Andrew and I are looking into this, time permitting... In the meantime, using the "standard" partition scheme works fine, or just use pre-built images.

-Fred
 
@Hans01 et all

Oops I forgot to mention, My setup in the " For Hans 4p.zip".

The operation is different.
It autoboots into whatever you have in hard-0 and hard-1.
To get to the Menu please press " M " at reset sorry if there was confusion.

Ray
 
@Ray and Fred

Thank you both for the additional information.
The M option is a good idea, I like it. :D

Fred, I know you want to get some help. ;)
You must understand that a large knowledge of the TRS 80 operating software is necessary to be helpful at all.
After not programming in assembler for more than 20 years, I'am afraid not being very helpfull at this point. :(

But still I want to give some suggestions, use them or ignore them, just as you like.
Adding a cls at the beginning of a cold boot. Adding a time controlled option to remove the loaded vhd (press C to clear).
Some cold boot info screen, showing what is going on.

@Ray and others.

I spent a lot of time to build my own hard disk image that can autoboot.
I have build an image what should be equal to the supplied images.
It still doesnot boot on my model 4P GA. :(
As I know this model needs a special treatment, I'am not sure if the problem lies there.
It is for LSDOS 6. Would someone be so kind to test it on a NOT model 4P.
The image is to large to add as an attachment, but I will be glad to mail it to you, please let me know.

Thanks.
 
Problem solved. :D

Thanks to the great support from Ray (Audronic)
He has helped me so many times with testing a new image on and on.
At last he sent me step by step instructions how he did it.
After reading this I discovered one missing line in my way of building the image.
The rebuild of the operating system was not done following the rules. :blush:
I forgot to copy sys0/sys at first before the other system files.
I thought that boot/sys and dir/sys had a special location, but sys0 too.

Ray and all the others who have helped me, thanks a lot.

Hans.
 
I know this is an older post, but I own a 4p GA and would be interested in the step by step instructions for building images.

Thanks!
 
Hello guys,
I'm facing the same problem, I need to build a new image for lsdos with french keyboard.
Hans, Ray, could you provide me that step by step instructions please ?
Thank you very much.
 
Back
Top