Making sense of dumped ROM modules

Talk in English

Modérateur : Politburo

Répondre
Jeff_Birt
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 49
Enregistré le : 14 sept. 2022 20:00

Making sense of dumped ROM modules

Message par Jeff_Birt »

Hello,

I have recently dumped two ROM modules: LOGIC jr II and an unknown module with Pygmy Software on PCB copper. I used CE-158 with CSAVEM"name";&0000,&3FFF. This means there is a CE-158 header at the beginning of the file. I'm not sure how long this header is but lhTools docs suggest 27 bytes.

There is some other data between header and first line of BASIC program. What is this? Is there a reference document that describes the memory map of ROM modules?

The unknown Pygmy module is very odd. After the CE-158 header if is all FF down to $201B where there is misc data to $20E0 where BASIC program starts. This module only has one bank, only EPROM and invertor on PCB. It may be faulty or have corrupt data. I will try to read it a few more times to compare and see if EPROM is faulty.

BTW, lhDump seems to get confused if you try to use the -Z switch to tell it there is a CE-158 header. It sees it is a CSAVEM header and then ignores the -B switch saying it is tokenized BASIC.

Thanks for any help.
Avatar du membre
Dom
Fonctionne à 2400 bauds
Fonctionne à 2400 bauds
Messages : 1387
Enregistré le : 26 oct. 2018 18:45
Localisation : Ile-de-France

Re: Making sense of dumped ROM modules

Message par Dom »

Hi Jeff,
Welcome here !
First, you need to present yourself in the right section 😉.
You're in the right place for what you're looking for !
I think the best expert of the PC-1500 is our friend cgh.
I hope he will have time for you.
Moi, c'est les poquettes, et la Coll'à'Dom, c'est
Jeff_Birt
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 49
Enregistré le : 14 sept. 2022 20:00

Re: Making sense of dumped ROM modules

Message par Jeff_Birt »

Dom a écrit : 01 nov. 2022 11:43 Hi Jeff,
Welcome here !
Thank you for the welcome. I am glad there is an English section as I last tried to speak French 35 years ago and was not good at it then and even worse now :)
Jeff_Birt
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 49
Enregistré le : 14 sept. 2022 20:00

Re: Making sense of dumped ROM modules

Message par Jeff_Birt »

I believe the data between the CE-158 header and start of BASIC program is a keyword table. I will experiment some more and post my results later this evening.
remy
Fonctionne à 2400 bauds
Fonctionne à 2400 bauds
Messages : 2221
Enregistré le : 13 mars 2006 15:39
Localisation : Issy
Contact :

Re: Making sense of dumped ROM modules

Message par remy »

CSAVE header is explained in the manual page 177:
https://www.notice-facile.com/notice/79100/SHARP+CE-158+
PockEmul, Emulateur de pocket Sharp, Canon, Casio, HP, TI, NEC, Panasonic, Sanco, Seiko, General, National, ....
sur Windows, Linux, OS X et Android
Available now on the Google Play Store and the Apple Store
Jeff_Birt
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 49
Enregistré le : 14 sept. 2022 20:00

Re: Making sense of dumped ROM modules

Message par Jeff_Birt »

To properly dump the ROM file I just needed to create a fragment file for lhTools. Then I could use the following command. The -Z switch tells lhTools there is a CE-158 header. The -F says to use the fragment file which tells lhTools the layout of the file. All address in the frag file are from start of program memory, not start of file.

Code : Tout sélectionner

lhdump -Z -F myFragFile.frag -o myOutputFile.txt Logic_Jr_II_CE158_580A_Raw.bin
The structure of the ROM module file dumped over CE-158 connection is:
0x0000-0x001B CE-158 header
0x001C-0x006F (0x0000 of module memory) Various parts of keyword definition table
0x012B-0x401A (0x0100 of module memory) BASIC listing (tokenized)

I had not realized that keyword tables can exist at 0x0000, some documentation does not show this. The first part of the file is shown below. The CE-158 header is first 27 bytes, 01 42->FF FF FF. The 55 is start of keyword table structure. There are a small number of address the PC-1500 scans for 55 on reset, this is a tag that indicates a keyboard structure follow. The end of the vary last line 00 01 1E 22 48 is the first line of BASIC code, 00 01 is line #1.

Code : Tout sélectionner

01 42 43 4F 4D 4C 4F 47 49 43 00 00 00 00 00 00 
00 00 00 00 00 00 00 3F FF FF FF 55 00 01 00 00 
08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 F1 92 31 40 02 F1 92 31 40 03 F1 92 31 40
04 F1 92 31 40 05 F1 92 31 40 06 F1 92 31 40 11 
F1 92 31 40 12 F1 92 31 40 13 F1 92 31 40 14 F1 
92 31 40 15 F1 92 31 40 16 F1 92 31 40 09 F1 92 
31 40 0A F1 92 31 40 0B F1 92 31 40 0C F1 92 31 
40 0D F1 92 31 40 0E F1 92 31 40 00 FF 00 00 00 
FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00 1A 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 01 F1 92 31 40 02 F1 92 31 40 03 F1 92 31 40 
01 40 43 4F 4D 20 20 20 20 20 20 20 20 20 20 20 
20 20 20 20 20 00 00 39 3C 00 00 00 01 1E 22 48
This keyword table structure here is gibberish, it has all zeros for the Table init vector, etc. Perhaps having a keyword structure here is just boilerplate for this developer?

The first few lines of the BASIC code are below. The first 16 lines or so of every bank are like this. The POKE &5089,0 will strobe the S3 control line and four bits of the address bus are used to drive the JK inputs of a dual flip flop on the module which controls banking. This banking is described here: http://www.pc-1500.info/2015/03/16/edte ... ry-module/

Code : Tout sélectionner

1 "H"POKE &6805,0:POKE &5805,0:GOTO "ST"
2 POKE &6809,0:POKE &5809,0:GOTO "HL"
3 POKE &6806,0:POKE &5806,0:GOSUB 12800:POKE X-&1000,0:POKE X,0:RETURN 
4 POKE &6805,0:POKE &5805,0:GOSUB 790:POKE &5809,0:POKE &6809,0:RETURN 
5 POKE &6806,0:POKE &5806,0:GOSUB 8450:POKE &580A,0:POKE &680A,0:RETURN 
Jeff_Birt
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 49
Enregistré le : 14 sept. 2022 20:00

Re: Making sense of dumped ROM modules

Message par Jeff_Birt »

remy a écrit : 01 nov. 2022 23:04 CSAVE header is explained in the manual page 177:
https://www.notice-facile.com/notice/79100/SHARP+CE-158+
Thank you.
Répondre

Retourner vers « Silicium in English »