• Please review our updated Terms and Rules here

Issue with FreHD Boot ROM in Model 4 Student Station

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
435
Location
Vancouver, BC, Canada
Are these GEN1 or GEN2 M4NGA ROMs? Just wondering which FreHD patched U70 (C) ROM I should try with this "standard" set. It's going to take me a little while to try these since I now realize I'm out of 2764 EPROM's in the parts box, but did find some cheap(ish) MCM68766 online, so I think I'm just going to try those since they don't require an adapter board to fit in the stock DIP24 U68 spot.

Those are GEN1 ROMs.

Also, I did trying booting without the RS-232 board attached with the various U70 ROM's and it didn't seem to make a difference.

Good to know the RS-232 is not a factor. I looked at a boot trace in the emulator until the patched ROM tries to load from the FreHD and there's just nothing unusual I can see. In fact, it does very little except some trivial initialization and a clear screen before it attempts the FreHD boot. There is one interrupt that occurs during the screen clear but that's it. And I otherwise cannot see how the patch would make any difference whatsoever.

It is really quite baffling. I can only think of two possible things to try at this point. One would be to make some kind of partial patch to the U70 ROM to figure out what exactly makes things go wrong. The other is to start the student station with the stock ROM set and then do some BASIC commands to load the FreHD boot block and see how that goes.

In the spirit of looking where it is easiest, here is a sequence of BASIC commands that should boot the FreHD.
Code:
POKE16912,16
OUT197,4:?INP(196):REM Should show 254 if FreHD attached
FORI=0TO255:POKE20480+I,INP(196):NEXT
POKE16526,0:POKE16527,80:A=USR(0)

Type in the commands in direct mode; don't put them into a program to run. I'm not sure that they'll work more than once and if something goes haywire after one of the statements we'll want to know that.

If that returns to the READY prompt then the FreHD boot block couldn't load FREHD.ROM. If it fails then trying again with all but the last line and then PEEK()ing at the 256 bytes loaded may provide some insight.

This won't tell us anything about the ROM patch problems, but it will show that the FreHD can work with a Student Station.

Edit: Fixed bugs. Initial poke was 32, should have been 16. And it is A=USR0() was wrong.
 
Last edited:

hideehoo

Member
Joined
Aug 4, 2015
Messages
44
Location
Prior Lake, MN
BASIC commands didn't work. Got a 255 from the second line, and the final line returned a SN Error (tried the whole sequence twice with a power cycle in-between).

IMG_20160301_002843.jpg

Keep in mind I have no idea if the FreHD I built is fully functional yet. It seems to work as expected (solid LED's on first boot, then only a single green flash on subsequent boots and when the SD card is inserted), but for all I know it could be bad. I'm still waiting for parts to finish a Quinnterface so I can also test on my Model I. I also have Model II, but no HD card so can't test there. Does the serial port output any sort of console log (like you see with a lot of network gear) on boot-up of the FreHD? I know Frederic mentioned he used it for debugging on his page, but I'm guessing that wasn't left active in the production 2.13 firmware? I tried a quick 9600-N-8-1 and 115200-N-8-1 hookup and didn't get anything intelligible.
 

veco

Experienced Member
Joined
May 12, 2013
Messages
95
BASIC commands didn't work. Got a 255 from the second line, and the final line returned a SN Error (tried the whole sequence twice with a power cycle in-between).

View attachment 29901

Keep in mind I have no idea if the FreHD I built is fully functional yet. It seems to work as expected (solid LED's on first boot, then only a single green flash on subsequent boots and when the SD card is inserted), but for all I know it could be bad. I'm still waiting for parts to finish a Quinnterface so I can also test on my Model I. I also have Model II, but no HD card so can't test there. Does the serial port output any sort of console log (like you see with a lot of network gear) on boot-up of the FreHD? I know Frederic mentioned he used it for debugging on his page, but I'm guessing that wasn't left active in the production 2.13 firmware? I tried a quick 9600-N-8-1 and 115200-N-8-1 hookup and didn't get anything intelligible.

The serial port doesn't do anything with released firmwares. One day, I need to implement an LSDOS driver so that a fast serial port can be used with the TRS80 (that's the intent of having the MAX232 there, the serial port comes for free with the PIC). If you build the FreHD firmware, you can enable the serial port as debug, and then it will print useful stuff...

With basic, you can run a few simple commands (see the FreHD documentation or source code) to see if it's seen by your TRS80. I don't have notes here at the moment, but it's pretty simple. Other people here can help you with this too.

-Fred
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
435
Location
Vancouver, BC, Canada
BASIC commands didn't work. Got a 255 from the second line, and the final line returned a SN Error (tried the whole sequence twice with a power cycle in-between).

My program had some mistakes -- I've gone back and edited my post to fix them. This time I tried the code on my Model 4 and ensured it worked there. You think I'd learn not to post untested code.

Sure sounds like your FreHD is functional. If you have a "frehd.rom" file on the card the BASIC code will load and run it.
 

hideehoo

Member
Joined
Aug 4, 2015
Messages
44
Location
Prior Lake, MN
My program had some mistakes -- I've gone back and edited my post to fix them. This time I tried the code on my Model 4 and ensured it worked there. You think I'd learn not to post untested code.

Sure sounds like your FreHD is functional. If you have a "frehd.rom" file on the card the BASIC code will load and run it.

Getting closer, got a 254 with the FreHD attached and powered.

IMG_20160301_182314.jpg

Still no boot menu though, tried both a 2GB and 4GB SD card. Does FreHD support SDHC? I'm using the SD-CARD contents starter files from Ian's download page.
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
435
Location
Vancouver, BC, Canada
Getting closer, got a 254 with the FreHD attached and powered.

View attachment 29905

Still no boot menu though, tried both a 2GB and 4GB SD card. Does FreHD support SDHC? I'm using the SD-CARD contents starter files from Ian's download page.

Most likely the boot block could not find "frehd.rom" on the card. As far as I know FreHD does support SDHC -- I believe I've even used one myself. The other thing is to make sure you have a FAT32 filesystem on the card (specifically not NTFS nor FAT32X). Also, if you're using a Mac there's a good likelihood it will "corrupt" the file system in such a way that the FreHD firmware can't read it.

I could write a BASIC program that mimics the action of the boot block and see what that gives. Might be a somewhat lengthy program, though, so let me know if 20 lines or so would be too much of a bother.

On a different tack, I experimented with the patched ROM on my Model 4P by loading it into RAM and running it. It didn't crash and loaded the boot block from my FreHD just fine. To me this leaves only two possibilities. Either the Student Station has some weird hardware quirks or there's something not right with the U70 ROM C you're making.

When you make a ROM C do you write the data to the U70 chip pulled out of the machine or a different one? If it is a different one then burning the stock image onto the different chip and trying that would certainly confirm that you're writing valid data to the chip. If it is the same one which you've reverted back to the original bytes then it also seems like the data we expect is getting there.

Or I guess we could come up with some simple ROM C that checksums itself, displays the results and then hangs as a way of testing the burn process. Maybe it sounds absurd, but it's at the point where we should rule it out as a problem. Student Station hardware quirks looks rather unlikely given that hardware changes cost money to develop and Tandy avoided that at all costs. That and I can't think of any decent tests for such an open-ended hypothesis.
 

hideehoo

Member
Joined
Aug 4, 2015
Messages
44
Location
Prior Lake, MN
Most likely the boot block could not find "frehd.rom" on the card. As far as I know FreHD does support SDHC -- I believe I've even used one myself. The other thing is to make sure you have a FAT32 filesystem on the card (specifically not NTFS nor FAT32X). Also, if you're using a Mac there's a good likelihood it will "corrupt" the file system in such a way that the FreHD firmware can't read it.

It's a FAT32 card written on a Win7 box, should be good. The odd part (at least looking at the FreHD docs), is I can never get the red LED to light, even when I power it on with say a NTFS formatted SD card inserted. Just flashes green once. I burned another PIC and tried it, went through the normal both LED's illuminated for a bit on initial load (so I know the red LED works), and then a single green flash, and another single green flash once the card is inserted. Checked my BS170, looked correctly orientated according to the datasheet, and anyways it sounds like if that's the problem, I should be getting a red LED.

I could write a BASIC program that mimics the action of the boot block and see what that gives. Might be a somewhat lengthy program, though, so let me know if 20 lines or so would be too much of a bother.

I would hold on this, since I have a feeling this issue is related to my FreHD build.

On a different tack, I experimented with the patched ROM on my Model 4P by loading it into RAM and running it. It didn't crash and loaded the boot block from my FreHD just fine. To me this leaves only two possibilities. Either the Student Station has some weird hardware quirks or there's something not right with the U70 ROM C you're making.

When you make a ROM C do you write the data to the U70 chip pulled out of the machine or a different one? If it is a different one then burning the stock image onto the different chip and trying that would certainly confirm that you're writing valid data to the chip. If it is the same one which you've reverted back to the original bytes then it also seems like the data we expect is getting there.

Or I guess we could come up with some simple ROM C that checksums itself, displays the results and then hangs as a way of testing the burn process. Maybe it sounds absurd, but it's at the point where we should rule it out as a problem. Student Station hardware quirks looks rather unlikely given that hardware changes cost money to develop and Tandy avoided that at all costs. That and I can't think of any decent tests for such an open-ended hypothesis.

All my new U70 burns have been on "new" chips. Remember, I initially copied the stock U70, burned it on a new chip, and that worked fine when I booted off that, so I'm pretty confident I can burn a good copy of the U70 ROM here. I agree with you on the hardware, the board P/N seems the same as other Model 4's. I would say just hold until I get some more parts in to replace both U68 (A) and U70 (C) with "stock" ROM images and see if they can boot this Student hardware.
 
Top