Memotech HRG ROM/PAL dumps?

Discussions about Sinclair ZX80 and ZX81 Hardware
system11
Posts: 32
Joined: Mon May 25, 2020 7:35 am

Memotech HRG ROM/PAL dumps?

Post by system11 »

I just picked up a working Memotech HRG, is the ROM inside the exact same one I see is bundled in the ROM directory with the EightyOne emulator? There are 2 PALs on the PCB too, does anyone know if those have been dumped?

I preserve arcade hardware mainly but I can desolder the parts and try to dump them if it's not been done yet - I'd just rather not have to if someone else has already gone to the trouble!
User avatar
1024MAK
Posts: 5527
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Memotech HRG ROM/PAL dumps?

Post by 1024MAK »

It’s always worthwhile checking these two sites:
Kio's Sinclair ZX Computers Archive
and
ZX81 Tapes, Hardware and Books Collection

As well as searching this forum and forum.tlienhard.com.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Memotech HRG ROM/PAL dumps?

Post by XavSnap »

Hi system11,

For many ZX81 ROMs, the dump can be saved in a "P" file, directly on a tape recorder.

Example: (to save the 0-1024 first ROM bytes)

Code: Select all

10 DIM R$(1024)
20 FOR A=0 TO 1023
30 LET R$(A+1)=CHR$ PEEK A
40 NEXT A
50 SAVE "ROMoneKB"
Just edit the "P" file in a binary editor to extract the R$ segment.

Have Fun.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Memotech HRG ROM/PAL dumps?

Post by XavSnap »

ZX81 BIOS MONITOR:
BiosDump.zip
(5.86 KiB) Downloaded 204 times
Rom_Compare.zip
(412.09 KiB) Downloaded 225 times

Memotech IF ROM: (ROM $0000 -> $1FFF)

Code: Select all

     1  REM [HEX:\
2A,12,40,EB,21,00,00,01,\
00,20,ED,B0,C3,5B,00,C9 ]

     2 DIM A$(8192)
     3 LET A$(1)=CHR$ USR 16514
     4 STOP 
     5 SAVE "DUMP-BIOs"
     6 RUN 
# VB81 XuR [If_Dump.p]
# SAVE"DUMP-BIOS" Line 5
# 1 REM: 16 Bytes@4082-4091
1 REM [DEC:\ 42, 18, 64,235, 33, 0, 0, 1, 0, 32,237,176,195, 91, 0,201 ]

;------- TASM ASM mnemonics. -------
; Compile this file using:
; Set TASMOPTS = -b
; tasm -80 ThisCode.tas MyBinary.BIN
;-----------------------------------
; Zx81 Program name: VB81 XuR [If_Dump.p] : SAVE"DUMP-BIOS" Line 5
; REM line name: 1 REM: 16 Bytes@4082-4091

#define ORG .org ; TASM cross-assembler definitions
#define equ .equ
;------------------------------------
;-BASIC sub-routine entry. -
;+----------------------------------+
; Lb4082 ; <- USR BASIC Enty.
;+----------------------------------+
;------- ROM and RAM Symbols -------
RAM_DEST equ $4012
ERROR_3 equ $0058

ORG $4082 ; [@16514/@h4082]
Lb4082:
LD HL,(RAM_DEST) ; GET DEST
EX DE,HL
LD HL,$0000
LD BC,$2000
LDIR
JP ERROR_3+3 ; []*BIOS ROM*
RET ; ==========================
.end


Were :
DE= A$ location. (target)
HL= ROM location. (source)
BC= ROM length (Bytes).

Memotech HRG @ 8192 to 10240 (length 2048 bytes)
The PALs are used to the address memory decoding. (??? EDIT: Next message !)
Last edited by XavSnap on Mon Jul 31, 2023 8:17 am, edited 1 time in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Memotech HRG ROM/PAL dumps?

Post by XavSnap »

Hi system11,

IC1 & IC2 ! Can you read the component reference ?

There is a 1K memory on this card... is where two 4x1024 bits RAM ships ?

Image
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
1024MAK
Posts: 5527
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Memotech HRG ROM/PAL dumps?

Post by 1024MAK »

IIRC IC1 and IC2 are the PAL chips.
The RAM used, is the internal 1K bytes of RAM in the ZX81. There is no RAM on this board (the Memotech HRG board).

The logic on this board (including at least one PAL) does the memory decoding for the internal 1K bytes of RAM in the ZX81.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Memotech HRG ROM/PAL dumps?

Post by XavSnap »

Thanks Mark,

I had to have a look to my codes to remember this hidden buffer...

The Memotech HRG use the internal ZX81's RAM to mirror the BASIC ROM, and patch the default values.

HRG ROM:
OutHRG.JPG
The IN/OUT command is use to switch the RAM to /RAMCS with a PEEK command.
It's located between $0000-$0400 memory offset.

This ROM/RAM trigger isn't support in EO.

Memotech HRG display ( IN/OUT A,5F ) 0=BASIC (ROM not patched)/2=memory buffer or 3=INVERTED+Memory buffer
Bit#1= Memory buffer.
Bit#0= Inverted character set.

Example/RAM test:
FRANCAIS.P
(2.72 KiB) Downloaded 190 times
PRN0032.jpg
PRN0032.jpg (8.11 KiB) Viewed 3834 times
Type LIST to view the command in french (FAST=VITE).
Last edited by XavSnap on Tue Aug 01, 2023 11:14 pm, edited 1 time in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
system11
Posts: 32
Joined: Mon May 25, 2020 7:35 am

Re: Memotech HRG ROM/PAL dumps?

Post by system11 »

So would the file I found bundled with the emulator be an accurate dump of the chip? If so, I don't need to desolder and dump it.

Yes IC1 & 2 are a PAL16 and a PAL14, I have the hardware to read these and if necessary brute force ones with the protection set.
User avatar
1024MAK
Posts: 5527
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Memotech HRG ROM/PAL dumps?

Post by 1024MAK »

If you can, the programming details of the PALs would be useful. I’ve not seen these details published anywhere yet.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
system11
Posts: 32
Joined: Mon May 25, 2020 7:35 am

Re: Memotech HRG ROM/PAL dumps?

Post by system11 »

How rare are these by the way so I know how much I'm risking? ;) It was part of a £300 lot on ebay.. I plan to keep it in working condition hence checking on availability of all programmable elements.
Post Reply