SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

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

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by dr beep »

I see IY is used. I might add a trick to set bit 7 of IY if that will do the trick.
User avatar
kokkiklhs
Posts: 103
Joined: Sat Jan 10, 2015 12:09 pm

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by kokkiklhs »

dr beep wrote: Thu Jun 01, 2023 8:32 pm You can't load zeddy-software directly. You need to convert them to TAP. Was the same in the first emulator.
Sure, I know! I've been using XTEN2TAP converter from .p to .tap and it works great on DOS, it is fast and uses wildcards for multiple conversions! So far I have converted and successfully tested around 100 games with SP-2-ZX81!

;)
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by dr beep »

dr beep wrote: Thu Jun 01, 2023 9:07 pm I see IY is used. I might add a trick to set bit 7 of IY if that will do the trick.
I altered IY check. Game runs. but is very slow. Screenupdates to 20 is still slow.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by dr beep »

Version 2.16 of the emulator.

; SP-2-ZX81 v2.16
; The 2020 ZX81-emulator for the 48K ZX Spectrum

; v2.16
; LD IY,NN will always set bit 7 in IYH
; IY is used in 3D ANT ATTACK. Emulator only used IY=#C000

ZIP for extension only.
File contains SP2ZX81v216.tap


EDIT: VERSION on 2023-06-01 STILL HAD DEBUGGER

AS OFF 2023-06-02 THIS IS THE RIGHT VERSION:
sp2zx81v216.zip
(13.93 KiB) Downloaded 282 times
Last edited by dr beep on Fri Jun 02, 2023 12:50 pm, edited 5 times in total.
User avatar
kokkiklhs
Posts: 103
Joined: Sat Jan 10, 2015 12:09 pm

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by kokkiklhs »

dr beep wrote: Thu Jun 01, 2023 9:32 pm I altered IY check. Game runs. but is very slow. Screenupdates to 20 is still slow.
Hey, but you are very fast and effective!!
Just out of curiosity, could you please think about what modifications you've made in the way that the emulator loads the converted .p to .tap files?
I'm asking because of the incompatibility with Spemu on the Enterprise, it works with the older versions (IIRC they displayed "program:xxx") and it doesn't with the newer (they display "bytes:xxxx"). Why does this happen?
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by dr beep »

kokkiklhs wrote: Thu Jun 01, 2023 9:52 pm
dr beep wrote: Thu Jun 01, 2023 9:32 pm I altered IY check. Game runs. but is very slow. Screenupdates to 20 is still slow.
Hey, but you are very fast and effective!!
Well, I forgot 1 thing..... version number in the menu.
Just out of curiosity, could you please think about what modifications you've made in the way that the emulator loads the converted .p to .tap files?
I'm asking because of the incompatibility with Spemu on the Enterprise, it works with the older versions (IIRC they displayed "program:xxx") and it doesn't with the newer (they display "bytes:xxxx"). Why does this happen?
The difference between 1997 and 2020 is the fact that after loading the old emulator created n RST 8 error.
Since my games write over sysvar the new emulator makes a JUMP to the NXTLINE-command.
Otherwise my games could not run on the new emulator.

The old emulator used a headerless routine to load and showed it as PROGRAM.
The new is using the BASIC-loader so it shows BYTES since the program is saved as a CODE-block.
The new emulator is more compatible with multiple storage devices since you can alter your own device.
Adding the same text would cost memory and the memory is used for other code like keyboardscreen.
Last edited by dr beep on Thu Jun 01, 2023 10:06 pm, edited 1 time in total.
User avatar
kokkiklhs
Posts: 103
Joined: Sat Jan 10, 2015 12:09 pm

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by kokkiklhs »

dr beep wrote: Thu Jun 01, 2023 10:00 pm The difference between 1997 and 2020 is the fact that after loading the old emulator created n RST 8 error.
Since my games write over sysvar the new emulator makes a JUMP to the NXTLINE-command.
Otherwise my games could not run on the new emulator.
Aha, so it's a matter of functionality... I see!!! No big deal, we'll live with that, I will just keep on using the older versions on EP :lol:
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by dr beep »

kokkiklhs wrote: Thu Jun 01, 2023 10:05 pm
dr beep wrote: Thu Jun 01, 2023 10:00 pm The difference between 1997 and 2020 is the fact that after loading the old emulator created n RST 8 error.
Since my games write over sysvar the new emulator makes a JUMP to the NXTLINE-command.
Otherwise my games could not run on the new emulator.
Aha, so it's a matter of functionality... I see!!! No big deal, we'll live with that, I will just keep on using the older versions on EP :lol:
On the ZX Spectrum it will also display BYTES: NAME
So the problem should be in the return to machinecode.
The new emulator uses a temporary SP and after loading goes back to the right SP.
Maybe the emulator has a bug with emulating the LD SP,NN command.
BTW... my emulator had that bug.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by dr beep »

I must compile a new version. This version has a debuggerroutine active which slows the emulator down
User avatar
kokkiklhs
Posts: 103
Joined: Sat Jan 10, 2015 12:09 pm

Re: SP-2-ZX81, the new ZX81-emulator for the 48K ZX Spectrum

Post by kokkiklhs »

dr beep wrote: Thu Jun 01, 2023 10:14 pm I must compile a new version. This version has a debuggerroutine active which slows the emulator down
Wow, this sounds great! I'm looking forward to it! Furthermore I will inform geco about the potential bug in his Spemu, he may want to fix it, as his latest compiled version is from 2014.
Thank you for the very detailed explanation, even though I didn't understand all of it (I need to study more about Z80 assembly), I'm sure geco will do!!
8-)
Post Reply