Sunday, 21 June 2026

Lambda 8300 ROM Reverse Engineering

The Lamdba 8300 is a 1980s sort of clone of the ZX81.

It was also called the BASIC 2000, Power 2000, PC 2000, PC 8300 and many other names.

I have looked at this previously, getting the ROM sort of working on the Minstrel 3.

I am now wondering if I can get the ROM fully working on the Minstrel 4th.

What Makes the Lambda 8300 Different?

Well, first off, it uses inverse video (like the Jupiter Ace). It has a blank cursor rather than the K. And that flashes.

When you type, 10P, you expect a ZX81 clone to fill in the rest, but this version is different, you have to type it in full, 10 PRINT.

If you type in the usual 1 0 P shift+P to start your favourite program, you don't get 10 PRINT ", you get 10P>.

To get what you want, you have to type in 10 P R I N T shift+5 H E L L O  W O R L D shift+5.

(yes, " is not SHIFT+P or even SHIFT+2, it is SHIFT+5)

It also squeaks at you as you press each key, with a different note for each one. There is a way to disable that if it drives you mad. The note is based on the position in the keymaps, so it seems a bit random, but the notes from high to low are ZXCV ASDFG QWERT 12345 09876 POIUY ENTER LKJH SPACE DOT MNB.

OK, 10 PRINT is maybe not the best example, there is a shortcut, you can press SHIFT + Z and it will type PRINT for you. You can also press SHIFT + X and it will type the next line number.

It is the last line number plus 10, which seems reasonable.

The maths functions are also on SHIFT + keys, see the keyboard overlay (stolen from the Eighty One emulator).

Marvel at that for a moment. See if you can find your favourite keys. Where is DELETE? Where is ", Where are the arrow keys ....

All the rest of the functions, you have to type yourself. F O R, N E X T etc.

It has different error codes, a bit more descriptive, two digits ones like OK IN 10, rather than the 5/10 on the ZX81.

No, it's not being judgmental, just telling me there is a Bad Subscript in Line 40.

It is compatible with ZX81 BASIC programs, but under the hood is implemented quite differently.

It comes with 2K of RAM as standard, and it appears it uses 1/3 of that immediately by having a fixed fully expanded display file.

Cue Curious Marc's elevator music: the ZX81 can support a collapse display file. Each line of the display file corresponds to a line on the screen. A line in a collapsed display file is 0-32 characters followed by a newline character. A fully collapsed display file (which is how the 1K ZX81 starts up) is just 24 newline characters (plus one extra one at the start). 25 bytes. The more you type, the larger the DFILE gets. The fully expanded display file (as the 3K+ ZX81 starts with) is 32 characters followed by a newline. That immediately uses 793 bytes of the 1024 bytes available on the ZX81.

The Lambda 8300 dedicates one third of it's 2K of RAM to the display file. Not having to deal with the collapsed display file simplifies editing and scrolling and CLS etc. so is a worthwhile optimisation, if you can justify the lost RAM.

It uses the same tape format, and can load ZX81 BASIC programs, but the programs it saves cannot be loaded on a ZX81. (I think due to changes in the system variables and keyword tokens)

I need to test it further, I imagine some machine code programs may have issues, but I tested things like Tut-Tut and 3D Monster Maze in the post linked above, and they seemed to work 

(Future Dave here, to clarify that, no machine code programs will work, only one that are purely BASIC and don't PEEK and POKE at the DFILE. The ones I tested previous were using an alternate ROM for the PC 8300 which is more ZX81 compatible. More on that in part 2. Of course there is a part 2. Don't you know me by now?)

(albeit with issues like the screen tearing and the font differences.)

As I found in the previous posts, the ULA has an internal 512 byte character ROM, which frees up the last 512 bytes of the ROM for more code.

This character set includes some modified characters, including a racing car and UFOs and diagonals, but none of the 50% chequerboard characters.

Timex(?) PC 8300

There is another ROM for the same hardware, when it is called the PC 8300 (sometimes attributed to Timex, but didn't they already have the TS1500 etc?)

This is more ZX81 compatible, with "press P for PRINT" type BASIC.

Like the Lambda 8300, it beeps when you type and has a flashing cursor, but this time the more familiar K and L.

I might look at this later, but for now I am concentrating on the Lambda 8300 ROM.

The Plan

There are three outputs from this process, each of which depends on it's predecessor.

1) Reverse Engineering

A complete reverse engineering of the ROM to generate a commented source file that produces a binary identical ROM. This will be very useful for further steps, it will help me understand what is going on with the changes (and is a nice thing to have).

2) Lambda 8300 for the Minstrel 4th

Using the disassembly, I would like to create a version of the Lambda 8300 ROM that will run on the Minstrel 4th. I can use the extra 5K ROM on the Minstrel 4th for the character ROM and new functions. I expect I will be able to use much of the same modifications as the ZX81 BASIC for Minstrel 4th ROM I previously produced.

3) A dedicated Minstrel 4th BASIC

I think this will be an excellent starting point to generate a dedicated Minstrel 4th BASIC, with the keyboard fully mapped to match the Jupiter Ace keyboard, and all the hardware features supported. I have lots of ideas for this, if things work out as planned.

I am not sure at this stage, but as it already has a hard coded location for the fully expanded display file, I wonder if I could move that to the Jupiter Ace screen memory and remove the NL characters at the end of each line. Is that a step too far? Maybe. But, I could get rid of FAST and SLOW modes, as it would always run like the Ace, FAST and display at the same time.

Getting Started

I couldn't find a disassembly, so I thought I would do my own. How hard can it be ....

... several days later ...

And it's done, mostly.

It turns out that it is mostly the ZX81 ROM code, relocated and in some cases reordered. In some places modified, maybe fixed or optimised, or just changed to be different.

I started with Z80dasm and generated an asm file.

The format this generated was not ideal, is uses 01234h for numbers (I would prefer $1234), but does a good job of marking up labels and subroutines (as l01234h and sub_1234h).

Whilst I don't like that style, it is different to the ZX81 source, and will help me keep track of the differences, as any changes I make, I will use $1234 etc.

There are a couple of syntax changes that my assembler of choice, TASM, requires.

Simple search and replace, ORG => .ORG, DEFB => .BYTE, and there needs to be a .END at the end.

It also does not things like RST 8, it has to be RST 08h.

With those minor changes, it builds binary identical.

I then spent many days modifying the source file, adding comments, converting code back into tables or data, every time I built it, I would compare with the original to make sure it was still binary identical.

I made heavy reference to the commented assembly of the ZX81 ROM, by Geoff Wearmouth

Lots of functions turned out to be identical, so I just added a comment with the function name from the ZX81 ROM. When there were differences, I added lots of comments once I had worked out what was going on.

"Interesting Points"

I made a lot of notes of "Interesting Points" as I was going along, to make a blog post. Lots of code snippets etc.

Looking back, I guess some of them might be, but I think I will just give you the very edited highlights here, and no code.

The disassembly can be found on my GitHub.

In general, it is the ZX81 ROM, relocated and reordered. There are some optimisations, some fixes, and possibly some new bugs.

  • The major changes are the fixed location and size display file and screen manipulation functions. Timing changes have caused the tear in the middle of the screen as seen in the previous posts.
  • There is now sound, three new commands, SOUND, TEMPO and MUSIC, to play notes on the built in speaker.
  • There is a keyboard beep, and new commands BEEP and NOBEEP to turn that on and off. 
  • The LPRINT routine is modified as it relied upon the character data that used to be at the end of the ROM, but is now internal to the ULA. It appears to be able to read that using some extra IO ports.
  • The NMI routines are missing the test function, on the ZX81, this was used to detect if it was running on ZX80 hardware (without an NMI generator). The Lambda 8300 ROM would never run on ZX80 hardware, so it is not required.
  • For some reason, the system variables, $400A (was E.PPC) and $4029 (was NXTLIN) have been swapped around.
  • The system variable $400C used to point to the display file, but it is now a fixed value pointing to the start of the program directly after the display file.
  • There were quite a few tables in the code, which was a little challenging, since the disassembler didn't know about those and tries to turn those into code. I kept finding what looked like nonsense code. Ah, I thought, another table.
  • Some of those are even more convoluted as they have an index table at the start which contains a list of offset into the main table, and of course, they are not in the same order.
  • One table I didn't have to deal with is the FUNCTION table, as they don't use that. You get to type most of them yourself.
  • There is some new code in the LOAD function, I think this is doing some conversion of ZX81 programs, as it can LOAD those, but cannot SAVE in a compatible format.
  • There seems to be an option to start an ROM at $2000 at boot. I am not sure if this was ever implemented, were there any Lambda 8300 cartridge ROMs (maybe something like the Timex TS1510 was planned?)

I will update that the version on github if I explore any functions further and add more comments.

Next

Next is to modify that to create the Lambda 8300 for Minstrel 4th ROM. Having the full disassembly should make that a lot easier (he said extremely optimistically)


Adverts

There are all sort of kits, test gear and upgrades and recreations of the ZX80, ZX81, Jupiter ACE and Commodore PET in my Tindie store.

Including the Minstrel 2, Minstrel 3 and the newly updated Minstrel 4th

EU shipping charges will have to increase from July 1st due to new rules to add a €3 charge + handling fee for every type of item in a parcel sent to the EU from here in the UK. It's unclear how that is going to work out, so if you want to avoid the extra charges, best order in the next few days (or spend over €150 where is apparently will not apply)


Patreon

If you enjoy posts like these, you can support me via Patreon, and get access to advance previews of blog posts (the next parts of this series are already on there) plus exclusive posts.

You also get progress updates on new projects and other behind the scenes updates, as well as access to my Patreon only Discord server for even more regular updates, and to discuss your own projects.