• Please review our updated Terms and Rules here

Epson HX-20 - FORTH ROM

LambdaMikel

Experienced Member
Joined
Jan 25, 2020
Messages
277
Folks, does anybody have a working FORTH ROM? The one that I found online (attached) is giving me the TRAP... I just tried to burn this on a normal 2764. The ROM is being listed in the menu, but I can't start it. I am unable to find any further documentation or alternatives of this ROM. So if somebody has a working FORTH installed, it would be great if I could get a EPROM / ROM dump.
 

Attachments

  • forth.zip
    6.1 KB · Views: 19
So these are my ROMs. I also found a different set online, for a French version, and the FORTH is still not working with that. Only ROM0 differs.

French ROMs:

My ROMs:
20220322_203136.jpg

The correspondences with the French ROM set above are:

- rom0.bin = E1-HC2.bin *different* !
- rom1.bin = C1-HX2.bin identical
- rom2.bin = D1-HX2.bin identical
- rom3.bin = E1-HX2.bin identical

Somebody said the FORTH works with their HX-20, but it is a European one. So I exchanged E1-HC2 with rom0.bin, and indeed, now getting a different menu
(I have a 2nd copy of these EPROMS, with handwritten labels, shown here) But FORTH still gives me the TRAP!.

20220322_210242.jpg20220322_210248.jpg

20220322_210303.jpg
 

Attachments

  • LambdaMikel's HX-20 ROMs.zip
    1.3 MB · Views: 15
It is interesting that the PC displayed with the Trap indicates it appears to be executing code out of RAM and not ROM (according to the memory map).

Dave
 
I have been having a very quick look at the F_ROM.BIN image you posted back in post #1.

This is indeed an 8KB image - so a 2764 would be the correct EPROM type for it.

I would expect this ROM to occupy the memory addresses $Exxx and $Fxxx. The last eight (8) bytes of this ROM are the vectors. The most important one being the RESET vector in the last tow (2) bytes of the ROM. Interestingly, the RESET vector doesn't 'point' into the $Exxx or $Fxxx ROM code! Therefore, it must depend upon some other code/EPROM to function?

EDIT: My assumption here is that it is the only ROM in the system. This may not be true. so which socket are you installing the 8KB FORTH ROM into and why?

You say on post #1 that the ROM is listed in the menu and you don't appear to be able to start it. In the same text you also refer to the TRAP!.

Can you explain this a bit further as to (a) what you are doing to insert the ROMs (and in which sockets) and (b) exactly what do you get on the LCD screen on start-up?

Happy to do a bit of poking around. Certainly I can see quite a lot of the FORTH words in the F_ROM.BIN image.

Cheers,

Dave
 
Last edited:
My guess (from having a little peek into the FORTH ROM (F_ROM.BIN) is that it lives at $6xxx and $7xxx (ROM #4 - Option ROM).

Is this where you installed it at?

Dave
 
There is some excellent documentation here: http://www.vintagecomputer.net/fjkraan/comp/hx20/doc/.

Chapter 16 contains some very useful information regarding the format of the EPROM for use with the MENU system. This looks sensible.

The 'starting address' for the FORTH ROM is $600C.

At this address is a NOP ($01) followed by a JMP to $70E7.

Let's see if we can work out where things are going bad from...

Dave
 
I would have thought it wouldn't have mattered which rom0 you had fitted to be honest. I would have expected them all to have scanned the ROM area to look for application programs to display in the initial start menu.

If you enter the '3' key to attempt to start FORTH and then it TRAPs - this indicates to me that the CPU has tried to execute an instruction that is not valid. In my experience, this generally means that the CPU has 'gone into the weeds'.

By looking at the Program Counter value (P) at $3B93, this indicates that the program has 'escaped' from the ROM and appears to be trying to execute something in RAM. This may not be incorrect - but (whatever it is doing) it is clearly getting upset.

You are now in the machine code monitor after the TRAP and should be able to Dump some memory around the P value to see what bytes are there. I don't seem to be able to find any information (yet) on the monitor, but I would try 'D 3B88' followed by a return to see what happens first. Hopefully, you should get a list of two-digit hexadecimal bytes...

I will have a look around for the description of the machine code monitor...

EDIT: Found it - Chapter 9 of the OPERATION MANUAL. Yes, a 'D' followed by up to 4 hexadecimal characters encoding for the memory start address. The result is the 15(decimal) bytes displayed from the specified start address.

Dave
 
Last edited:
Hi Dave, thanks much for taking a shot at that! Unfortunately, the system is frozen at that point, so I can't do anything with the monitor in order to do further debugging. My hope was that somebody would say - well, that ROM is indeed corrupt, here you have mine. But the only FORTH ROM that's floating around is that one, and what's strange is that some folks are saying that this image IS working in their machines, eluding to differences in the US and EU versions of the HX-20. Well, I tried with European (French) as well as the original US (?) ROMs, and it didn't make a difference to me. But there are also different motherboard revisions. But I doubt that this has anything to do with that. Hopefully somebody will let me know of the correct Hardware / Software configuration that makes this work (if it works at all... )

All I am doing is - Initialize the System. Ctrl-@. Enter the date again after re-initialize (one has to). Then the menu shows up. Then 3. Then crash. This happens with and without additional push to the reset button (which brings you into the menu again). Moreover, I also tried starting BASIC first. They occupy the same RAM. Some programs require BASIC to initialize the RAM first, e.g., SkiWriter. And sometimes, the behavior for FORTH is different then. On occasion, I am getting a "0" and then a "-" where I can enter sometime, so it looks like a FORTH interpreter. But it doesn't do anything. So it is definitely dependent on RAM state, as you already identified, but overall, 90 % of the time it's BREAK and dead, or Trap! and dead.

The FORTH EPROM is in the optinoal ROM slot (the one on the left). It occupies from 0x6000 on. The EPROMS and my programmer are fine; I am able to burn SkiWriter into a ST. Also same effect with the original system EPROMS; the hand-labeled ones in are identical with the exception of E1 HC-1 which I had replaced with the "French" system ROM because someone said to try that.

FOhEShrVcAAnGdO.jpgFOhESOpVEAAE2iD.jpgFOhESyHVkAEd5r2.jpg
 
Last edited:
I have started to disassemble the FORTH ROM and came across an inconsistency I am trying to resolve with the utility subroutines within the $Exxx and $Fxxx ROMs.

I am just wondering (thinking aloud) as to whether the utility subroutines changed at some point - thus invalidating the FORTH ROM? If the FORTH ROM is calling a subroutine at address $FF4F expecting it to execute function 'A' and it executes function 'B' instead...

Let me ponder that thought for a bit...

It is just possible that different 'language' variants still have the same underlying subroutine tables - but that doesn't mean there is an older ROM that the FORTH may have been designed to use.

Dave
 
Interesting. Well there should have been a BASIC 1.0 and ROM for that. I know of a guy on startdot.org.uk who is assembling a table, and he claims to have different ROM versions. Maybe that's going to be the resolution then. He said he would be updating his page with the ROMs this weekend.

In any case, I hope that Epson would have been (hopefully) clever enough to not change the addresses of crucial firmware routines so that an OS upgrade wouldn't break existing software like this...


So far his links all go 404:

 
>>> In any case, I hope that Epson would have been (hopefully) clever enough to not change the addresses of crucial firmware routines so that an OS upgrade wouldn't break existing software like this...

That’s what you would hope - but...

Dave
 
Hello,

The FORTH ROM file you have may be mine? Where did you get it from?

If it is mine, then it's the HCCS FORTH (J.W. Brown). I've still got this on my PCW, and it's still working fine.

The usual cause of this sort of Trap is because you're trying to run the system without doing the 'Cold' start, and data in the system area is causing confusion, but I don't think you're saying that you have done this. Do you get the message about 'Warm' start, you need to say 'No' to this first time you use the system, 'Warm' is viable ONLY if the System areas are still OK for Forth!

I've got the manual for this FORTH as well.

Any queries, let me know.

Geoff
 
Hi Geoff,
correct, I never got the 'Warm' question. It always crashes right away, I tried all possible initialization and reset sequences. So it is definitely not working in my 3 HX-20's. I also tried a number of different ROM0's, as described (i.e., the French one), changed the DIP setting to French, and what have you. It's always the same - Trap! or Break.
What is your system configuration please? If you could dump your ROMs, that would help. Uploading the PDF manual would also be great. Well, asking a lot of you ;-) Sorry
Thank you
Michael
 
PS I got the FORTH.BIN from here; see Programs1.zip. https://www.pjspot.com/hx-20/wp-content/uploads/Programs-1.zip
AFAIK, yours from the stardot.org.uk thread is identical (I did a diff...) I followed the thread on
https://stardot.org.uk/forums/viewtopic.php?f=45&t=13893&start=90
but I think it never was resolved, right? Same problem there basically.
If yours is working fine, it would really help if you could provide a complete dump of your system ROMs and details of the mainboard version
(because I think you are the only one who has that working).
 
Hello,

I've just downloaded the file you attached in your initil post, and YES, this is the file I created of the HCCS system.

Check the code in the .BIN file, offset 0FB0, and you'll see the J.W.BROWN, and a little further on another. This will be the file that I created from my installed ROM, and posted on another forum some time ago.

I've got an internal RAM expansion card in my HX which may change things, but otherwise my HX is standard as origianlly purchased by my 1982.

I've got a note handwritten in my manual (written by me) which describes process to activate the FORTH ROM. This is not mentioned in the published manual. I don't know if this is relevant dep on the RAM expansion being there, but I think this was written before I had the RAM expansion (which uses some of the same memory space as the FORTH ROM needs??

Enter MONITOR (either using MON then Return from BASIC or thye 1 from Menu.

This in Monitor screen, type

S FFF5 <return>

a value will appear, and a prompt for a new value.

Type 08 <return>

screen will then say

S FFF6 and new value, at this point type '-' (i.e. dash/hyphen char) and press return.

Then B this will exit from Monitor

Then need the Ctrl+@ to reset.

In effect, you are using the Monitor to change the value of one data byte at address FFF5 from whatever it first showed as to 08.

Does this change anything for you.

I'm sure the .BIN file is OK as I'm sure at least one other has got it working OK.

The manual is 100 A5 pages, and it would have been printed using a dot matrix printer and it's not always 100% readable (but the original is OK) so I'm not sure how a scan would come out. Could try, but can't say when.

Geoff
 
Geoff, I tried this in the Monitor - with and and without Ctrl-@ after the B from the monitor. It makes no difference. Are you sure about Ctrl-@ though? This will reinitialize everything, no? Anyhow, it makes no difference. I also have a machine with 16 KB internal expansion. Can try there, too. But I am skeptical.

The phspot site probably grabbed it from stardot.org.uk? It's not my site btw.

EDIT: Doesn't work with my 16 KB EXP RAM HX-20 either...
 
Last edited:
Hello again,

I OUGHT to try the FORTH again to make sure of what I'm talking about. Just now it's not showing on the menu as I needed all the RAM for various other things I've been messing with, incl things connected with using .WAV files to LOAD progs.

I was involved with some discussion on the stardot forum a while back, I think that's when I posted the .BIN file there. Then more recently the guy in Australia who owns the pjspot site was helping me with some data recovery re the BOMBER game, and I think I sent him the .BIN file then, but he may have got it already.

Yes, I'm pretty sure about the Ctrl+@ (initialisation). I assume that this process does NOT affect the FFF5 location? Although this ought to be ROM anyway??

My RAM card uses a similar process to activate the 8K Option ROM. i.e. you can have EITHER the 16k RAM active, OR 8k RAM with the Option ROM active. May be that if I use THAT process to enable the Option ROM then I don't need to use the monitor process I mentioned above. Can't remember. What do you need to do to activate your RAM card, and do you have an option re all the 16k or just 8k RAM AND the ROM.

Geoff
 
> Yes, I'm pretty sure about the Ctrl+@ (initialisation). I assume that this process does NOT affect the FFF5 location? Although this ought to be ROM anyway??

Exactly. Using the monitor, after changing FFF5, the "new value 08" is not being shown, so it doesn't seem to work (whatever this initialization is doing). So maybe your HX-20 is really a different piece of hardware.

I don't need to enable the option ROM. I just have a stock HX-20 and put it in the option ROM slot, bingo. That works for SkiWriter, for example. For the memory expansion, I am not sure, BASIC just finds it. Btw, I also tried using it in the external RAM/ROM expansion module, with the 3 different settings it has (full 16 KB RAM, 8 KB RAM + 8 KB ROM, and 0 EXP RAM + 2 EXP ROM).
 
Back
Top