• Please review our updated Terms and Rules here

Issue with FreHD Boot ROM in Model 4 Student Station

hideehoo

Experienced Member
Joined
Aug 4, 2015
Messages
51
Location
Prior Lake, MN
I've got a Model 4 Student Station (Model 26-1059) that's a diskless 64KB machine.

ad-model-4-student-station-for-network-3-[26-1059]-(rs).jpg


It has an 8048364 in U68, so I'm using the Gen 2 ROM image from Ian's page.

http://ianmav.customer.netspace.net.au/trs80/downloads.htm

IMG_20160223_005403.jpg

Without the FreHD connected, I'm getting garbage screens on boot or reset.

IMG_20160223_004835.jpg
IMG_20160223_004852.jpg

If I connect the FreHD, it get a different boot experience, random garbage moving around the screen.

IMG_20160223_004913.jpg

The FreHD seems to be fine, single green LED flash on boot and another when inserting the SD card.

I've burned a couple copies of the ROM (no dice), tried the Gen1 ROM just for fun (no dice), and even copied the stock ROM and burned it onto a new 2716 EPROM to verify my setup (that worked fine).

Any thoughts? Is there something special about this flavor of Model 4 perhaps? Here's a copy of the stock ROM if someone wants to compare it to another stock Model 4 Gen2 ROM before it was modified with the FreHD boot code.

https://drive.google.com/file/d/0B0g9QvyUT9LLMDVCTTVVLU9NNDg/view?usp=sharing
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
438
Location
Vancouver, BC, Canada
Some preliminary results in an emulator suggest that the U68 ROM and maybe the U69 ROM differs from those in a stock Model 4. The U69 ROM has a part number I recognize so I assume it is the same.

Could you dump U68 so I can compare it?

If U68 is different then I imagine it might explain why the FreHD ROM doesn't work.
 

TRS-Ian

Veteran Member
Joined
Sep 10, 2011
Messages
1,036
Location
Melbourne, Australia
These M4 Student Workstations are a problem. I was helping someone out with one in November 2015 who had the same problem. I also recall that in the end he just install a motherboard from a regular 26-1069 Model 4 in place and it worked.

I need to go back over my emails on my work computer but the Roms appear different in the student workstations and I think the solution is probably to replace U68 with either a Gen1 or Gen2 U68, then U70 with the matching Gen1 or Gen2 auto boot Eprom.

U69 should be a 8040332, which is used on all Model IIIs, and Gen1 and Gen2 NGA M4s.

Ian.
 

hideehoo

Experienced Member
Joined
Aug 4, 2015
Messages
51
Location
Prior Lake, MN
Thanks guys, any hints on how to dump this custom masked ROM in U68? I've got MiniPro TL866, but have no idea on the pin-outs or data organization for these and some quick Googling didn't yield any solutions. I see solutions for dumping the ROM from machine memory to disk, but lacking disks, could the same be accomplished by dumping to the serial port and capturing in an attaching terminal host?

Assuming U68 in the Student Station is different, can it even be replaced by a standard 27xx EPROM part or something similar on an adapter board, or would I need to source an original ROM A chip?
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
438
Location
Vancouver, BC, Canada
Here's a short BASIC program that should dump the U68 ROM to the RS-232 port at 19200 baud, 8 bits, no parity, 1 stop bit. It outputs the 8192 bytes in decimal, one per line. Not the fastest way, but useful if you're capturing it in a terminal program.
Code:
10 OUT232,0:OUT234,111:OUT233,255
20 FORI=0TO8191:A=PEEK(I):S=S+A:GOSUB50:NEXT
30 A=S:GOSUB50:END
50 A$=STR$(A):FORJ=2TOLEN(A$):B=ASC(MID$(A$,J,1)):GOSUB70:NEXT
60 B=13:GOSUB70:B=10:GOSUB70:RETURN
70 IF(INP(234)AND64)=0GOTO70
80 OUT235,B:RETURN

I've not tested it yet, but will do so later today. If you have a windows machine I can also provide a program to receive the data and convert it to a binary file.

--------------
Update: Two bug fixes and the program works for me. Attached is a zip file with the BASIC program and romser.exe for reading the uploaded ROM directly (with C++ source). Directions:

Connect serial cable between your PC and the Model 4 Student Station.
Type in the BASIC program on the Model 4.
Run "romser port# out.rom" on the PC. "port#" is the COM port number of the serial connection (e.g., 1, 2, 6, etc).
RUN the BASIC program.

If all goes well the PC will slowly print out the numbers 1 through 8192 indicating it is reading data. Takes several minutes. There is a checksum so most errors should be detected. It will output whatever it gets to "out.rom".

If you aren't using a windows box then just capture the output of the BASIC program in some terminal program and send me the file and I'll do the conversion. Or you can convert it yourself; I'm just keen on seeing this new, unexplored ROM.
 

Attachments

  • romdump.zip
    7.5 KB · Views: 1
Last edited:

TRS-Ian

Veteran Member
Joined
Sep 10, 2011
Messages
1,036
Location
Melbourne, Australia
I've reviewed my notes from November 2015 when I was helping another gentleman out with his student workstation and I sent him a Gen1 U68 (pulled from my own test bench M4NGA Gen1 system) in the mail. A photo of his roms showed he had 8040332 in U69 (as expected) however changing U68 and retaining U69 didn't work with FreHD Auto boot M4NGA Gen1 boot eprom in U70.

I'll be keen to hear what you find, George.

Ian.
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
438
Location
Vancouver, BC, Canada
I've updated my previous post with a fixed BASIC upload program and added a Windows command line program to receive and convert the data.
 

hideehoo

Experienced Member
Joined
Aug 4, 2015
Messages
51
Location
Prior Lake, MN
Thanks again, I'll try to get it dumped shortly. My "N" key finally gave up the ghost tonight, so I spent the evening pulling and fixing all the keys with a resistance over 1K.
 

hideehoo

Experienced Member
Joined
Aug 4, 2015
Messages
51
Location
Prior Lake, MN
Keyboard is back together, BASIC program is entered, and the dumped ROM set is attached. Looks like the included receiver program has some bugs (was accumulating bytes faster than the TRS-80 was sending), and I didn't have a C compiler handy, so I just captured the output in TerraTerm and wrote a quick script to convert the ASC values back to a binary file. Dumped each one twice and got the same checksums, but did notice when I dumped U70, two bytes near the end had flipped from 00 00 when I dumped it with my TL866 to FF FF in the dump I took via serial. Not sure what's up with that.

View attachment roms.zip
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
438
Location
Vancouver, BC, Canada
Huh, sorry about the program breaking; I swear it worked for me (yeah, that's what every programmer says).

Dump looks good to the extent that it runs in my emulator. A quick binary comparison shows a few double-handfuls of differences between the usual Model 4 U68 ROM and the Student Station one, but it'll take me a bit to figure out what the critical changes are. U69 is identical as expected and U70 is quite different.

The U70 bytes you noticed being different are because the printer port is mapped into those memory locations. When Radio Shack made the Model III they changed all memory mapped devices to I/O ports but felt they had to keep the memory mapped printer port for compatibility. Well, the keyboard and screen memory remain memory mapped. And the Model 4 followed suit to keep Model III compatibility.
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
438
Location
Vancouver, BC, Canada
It looks like applying the model4rom.gen2.asm patches to the Model 4 Student Station ROM will work. I'll try this later tonight unless somebody beats me to it.

While I haven't nearly sorted it all out, the big change to U68 seems to be optimization of the printer output routine in order to make space to spill some code from the U70 ROM so that it can fit the student station boot code (nominally activated with SYSTEM /12363). I also noticed that the "Cass?" text was moved from U70 to U68.
 

Petrofsky

Experienced Member
Joined
Jun 4, 2012
Messages
171
Location
California
Thanks for posting the picture and dumps. Can you post a picture of the U70 chip, too, please? Is it a ROM or an EPROM?

I haven't attempted any disassembly, but I notice that the MEMTEST checksum of the ROM C (U70) is 48BC, which is the same sum as the ROM C portion of the gate-array ROM B/C (8075369).

That suggests that the ROM A (8048364) is not expecting anything different in the ROM C area than a gate-array ROM A expects. So, I don't know why the the FreHD gen2 code works with gate-array ROMs but not with this ROM A.

Perhaps this ROM A tries to jump straight to the serial boot code in the ROM C?
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
438
Location
Vancouver, BC, Canada
I applied model4rom.gen2.asm to the U70 ROM from the Model 4 Student Station and it seems to work. It boots in my emulator and it also runs through the FreHD ROM boot code.

Should work fine on the real hardware. I've attached the ROM, let us know how it goes.
 

Attachments

  • u70frehd.zip
    1.8 KB · Views: 1

hideehoo

Experienced Member
Joined
Aug 4, 2015
Messages
51
Location
Prior Lake, MN
Thanks George, but that modified U70 ROM still results in just garbage at start-up, both with and without a FreHD attached. Going back to my original U70 ROM or a burned copy clears it up. I tried two different burns with the new U70, no go with either one.

Any chance I could get a copy of a "stock" U68 ROM image? I know Ian mentioned this didn't seem to work for the other gentlemen earlier in this thread, but I have some 27xx to 23xx adapter boards in my Commodore parts box, so I'd be curious to at least give it a try.
 

hideehoo

Experienced Member
Joined
Aug 4, 2015
Messages
51
Location
Prior Lake, MN
BTW, your modified U70 ROM is exactly the same as the U70 (C) area of the Model 4 Gate Array B/C FreHD modified ROM from Ian's download page. Earlier Petrofsky said the stock ones were the same, so it would make sense the patched ones are also the same.
 

gp2000

Experienced Member
Joined
Jun 8, 2010
Messages
438
Location
Vancouver, BC, Canada
My FreHD distribution must be slightly out of date as it didn't have a ROM B/C for the model 4 gate array. Oh well, some comfort that I ended up at the same place.

Here's a standard Model 4 ROM set all jammed together in 14KB file. I'm guessing you can break out the pieces you need easily enough.

So, patched ROM fails whether or not FreHD attached. But it works in my emulator. And the normal Model 4 ROM works in the Student Station and even works with FreHD patches. And FreHD with patches works on the same "BIOS" ROM. So it must be something in ROM A, but something my emulator didn't noticed.

It must be crashing before the FreHD check otherwise the FreHD would boot. Unless the FreHD boot code has some unlikely ROM dependencies. Since it crashes a bit differently with or without the FreHD there could be something to that.

Well, all I can think of at the moment is the RS-232. My emulator doesn't emulate the RS-232 so that would explain why the patched ROMs work on the emulator but not the real machine. I'll go do some tracing and disassembly and see if anything along those lines fits.
 

Attachments

  • model4.zip
    11.7 KB · Views: 1

veco

Experienced Member
Joined
May 12, 2013
Messages
95
Do you have a good dump of this machine original roms ? If yes, I am happy to do a quick disassembly and (hopefully easily) patch them.

-Fred
 

hideehoo

Experienced Member
Joined
Aug 4, 2015
Messages
51
Location
Prior Lake, MN
My FreHD distribution must be slightly out of date as it didn't have a ROM B/C for the model 4 gate array. Oh well, some comfort that I ended up at the same place.

Here's a standard Model 4 ROM set all jammed together in 14KB file. I'm guessing you can break out the pieces you need easily enough.

So, patched ROM fails whether or not FreHD attached. But it works in my emulator. And the normal Model 4 ROM works in the Student Station and even works with FreHD patches. And FreHD with patches works on the same "BIOS" ROM. So it must be something in ROM A, but something my emulator didn't noticed.

It must be crashing before the FreHD check otherwise the FreHD would boot. Unless the FreHD boot code has some unlikely ROM dependencies. Since it crashes a bit differently with or without the FreHD there could be something to that.

Well, all I can think of at the moment is the RS-232. My emulator doesn't emulate the RS-232 so that would explain why the patched ROMs work on the emulator but not the real machine. I'll go do some tracing and disassembly and see if anything along those lines fits.

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.

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.
 

hideehoo

Experienced Member
Joined
Aug 4, 2015
Messages
51
Location
Prior Lake, MN
Do you have a good dump of this machine original roms ? If yes, I am happy to do a quick disassembly and (hopefully easily) patch them.

-Fred

There's a dump of the my U70 (C) ROM linked at the end of post #1 on this thead, and a full dump of my A/B/C ROMs attached to post #9.
 
Top