SP-2-ZX80, the development

Emulator and emulator development specific topics
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

SP-2-ZX80, the development

Post by dr beep »

As requested I would alter the SP-2-ZX81 emulator into a ZX80 emulator.

I want to use this topic as a incentive to stay coding on it.
So I started the first step.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX80, the development

Post by dr beep »

Step 1

The current emulator consist of
4K emulator
1.5K intrupt and screenroutines
2.5K translated ZX81 ROM


However.....
the current emulator has opcode #06 in the 2.5K translated ROM. I had no fitting place inside the 4K?
For the ZX80 I need to delete the translated ROM so best would be to have opcode #06 inside the 4K of the emulator.

I altered my latest version and now I have moved some routines making a place for #06 emulation.
The routines on a fitting place could be placed elsewhere.

The emulator now fits 4K and the screenroutine can be altered for the ZX80.

Next we need the ZX80 ROM.
User avatar
Paul
Posts: 1517
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: SP-2-ZX80, the development

Post by Paul »

Thank you very much for starting this new development.
In my simple mind I thought you would insert the ZX80 ROM and done - just as on the real ZX81.
I stay tuned to learn more about your emulator.
Thumb up!
In theory, there is no difference between theory and practice. But, in practice, there is.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX80, the development

Post by dr beep »

Paul wrote: Wed May 04, 2022 9:24 pm Thank you very much for starting this new development.
In my simple mind I thought you would insert the ZX80 ROM and done - just as on the real ZX81.
I stay tuned to learn more about your emulator.
Thumb up!
That might work still, but I will do step by step and after the first working version I can speed the emulator up by translating the most used routines from the ROM. As I did with the ZX81.

Along with that.....
the intruptroutine must read the characters from a different location. So it is not just changing the ROM.

Advantage here... I have 4K extra to code since the ROM is only 4K.
Besides that I would add a menu with the ZX80 characterset.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX80, the development

Post by dr beep »

So I started to delete all translated ROM and then I found another opcode that was still there.
I had to find a place within the first 4K and I succeeded.
Where I placed the lastest IX option or the ZX81 (on/off switch routine) I could place the final opcode.

I don't think I need IX on the ZX80, I don't think there are games using some kind of intrupt.

I also noticed that I must redraw the ZX80 keyboard for the HELP-function, but that is extra.
nollkolltroll
Posts: 325
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: SP-2-ZX80, the development

Post by nollkolltroll »

So this will be an 8k ROM that is placed in a speccy?
/Adam
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX80, the development

Post by dr beep »

nollkolltroll wrote: Thu May 05, 2022 9:03 pm So this will be an 8k ROM that is placed in a speccy?
I was thinking of the 4K ROM, but the display is like the ZX81 so no flicker ever.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX80, the development

Post by dr beep »

First look on the ROM to see where I need an alteration.
I need alterations in the displayroutine like the ZX81, but I need to know where.
I took a look at a flickerfree game how the display was done and at that part of the ROM the alteration is needed.

Other alterations will follow to speed up the ROM but first I need to start the ROM and show a screen.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX80, the development

Post by dr beep »

The IX-register is NOT used in the ROM which means that it can be used in programs.
The emulator is optimized for the ZX81 which means IX is reserved on the ZX81.

Now the emulator "might" need IX-emulation.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX80, the development

Post by dr beep »

1K Space intruders uses 1 IX-opcode for timing, so I must take a look.

Code: Select all

L41D4:  PUSH    BC                      ; 11    Perform a delay to balance the alternate paths to $41D7.
        POP     IX                      ; 14
Why not

Code: Select all

L41D4:  PUSH    BC                      ; 11    Perform a delay to balance the alternate paths to $41D7.
        POP     BC                      ; 10
        NOP					; 4
Same number of bytes. Will take a look how to solve (or not)
Post Reply