New release of EightyOne available

Emulator and emulator development specific topics
MunichSpec
Posts: 4
Joined: Sun Oct 08, 2017 11:21 am

Re: New release of EightyOne available

Post by MunichSpec »

OK, this is definitely weird. I digged into things a little deeper, brought up EightyOne 1.23 with these settings:
20210622_155421_capture.png
, i. e. Sinclair ZX Spectrum, IF1 Ver. 2, 2x MDV, blank test cartridge created with

Code: Select all

fsutil file createnew cartridge.mdr 137923
Then I ran a couple rounds of

Code: Select all

FORMAT "m";1;"TEST"

Code: Select all

CAT 1
directly from the Spectrum's editor:
20210622_155500_capture.png
and came up with a cartridge the miraculously gained 9kB in size (God, how we would have liked this to be possible back then!):
20210622_162312_capture.png
Afterwards, the file size was 139'008 instead of 137923 (cartridge image attached).

So, conclusion: Something is appending stuff to that file, which should never ever happen.
Attachments
cartridge.zip
(2.43 KiB) Downloaded 179 times
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: New release of EightyOne available

Post by Fruitcake »

Version 1.24 of EightyOne is now available:
https://sourceforge.net/projects/eighty ... -emulator/

It addresses a number of bugs.
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: New release of EightyOne available

Post by Fruitcake »

MunichSpec wrote: Tue Jun 08, 2021 10:47 am I just encountered a very weird behaviour with EightyOne 1.23 in conjunction with the Interface 1/Microdrives
Version 1.24 partially addresses this issue.

EightyOne holds an array of bytes representing the contents of a microdrive cartridge, including the gaps between header and data blocks. When EightyOne is exited, it writes any changes made to the microdrive cartridge out the file representing it. The process that did this assumed a header block would always be followed by a data block and failed to take into account that the bytes representing the gaps would not always simply consist of preamble bytes (something that would occur simply by formatting a cartridge). The code was therefore incorrectly detecting blocks that did not actually exist and resulted in it writing out more data to the file than it should.

The fix made for this issue was to only write out valid blocks, allowing the bytes of gaps to be fully skipped over no matter what their content. But a consequence of this is that invalid blocks will not be saved out, even if originally read in. A major rewrite of the emulation mechanism would be required to overcome this limitation and fully emulate a microdrive cartridge. However, for most purposes the new behaviour means that the microdrive functionality finally becomes usable.

A new feature has been added that allows creation of a blank microdrive cartridge directly from within EightyOne.
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: New release of EightyOne available

Post by Fruitcake »

EightyOne v1.26 is now available for download.

This version contains the prototype AY sound fix created from Mike prior to development effort switching to EightyOne V2, and was debugged by SirMorris.
Spinnetti
Posts: 252
Joined: Sat Sep 12, 2020 11:29 pm

Re: New release of EightyOne available

Post by Spinnetti »

Thanks! I've got a selfish request.... Any time I use eightyone, my random functions don't randomize because the frame counter is always the same when I start the program - any chance FRAMES could be randomized on startup? (if this isn't a nonsense question lol)
Zeddy: ZX80, ZX81/ZXpand, TS1000/ZXpand, TS1500/Zxpand+
Speccy: 48k, +, +2, +3, TS2068, "Bare Metal" Pi, Next KS2, IF1/Microdrives/Vdrive/Light Gun/VGA-Joy
QL: Minerva/QL-VGA/Custom PSU
C5: 24v, LiFE battery, Disc brakes
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: New release of EightyOne available

Post by Fruitcake »

Spinnetti wrote: Tue Feb 08, 2022 3:13 am my random functions don't randomize because the frame counter is always the same when I start the program - any chance FRAMES could be randomized on startup?
The thing to keep in mind is that when you load a program into a real ZX81 then this is the behaviour you get there also. If the behaviour of EightyOne were changed as you suggest then it would no longer being emulating the behaviour of a real system.

To tackle this, what your program should do is allow the Frames counter to clock up for a varying length of time before you use it to seed your random number generation. An easy way to do this is to wait for the user to press a key to move onto the next title screen or to begin a game, etc. It's very unlikely they would always press a key after exactly the same number of TV frames have elapsed, and hence the user in effect provides the seed for the random number generator! If using RND from BASIC then you would simply execute RAND once the user has pressed a key.
Moggy
Posts: 3222
Joined: Wed Jun 18, 2008 2:00 pm

Re: New release of EightyOne available

Post by Moggy »

Sad to report that the whilst the AY may make suitable bleeps for games, all the AY music creation/player software I use no longer works.

First tried the Gasman demo which used to work well and is a good test albeit with crap sounding AY, now plays rough sounding AY whilst the program itself crashes with a "C" error report as do the STC and PT3 players.

The tracker software cannot load song files as the SNG extension is now no longer recognised as it used to be with Eighty One seemingly only recognising P files.

A shame really as SZ-81 and Eighty One were the only emulators that could actually load and run this software without crashing even if Eighty one's AY was ropey.
Spinnetti
Posts: 252
Joined: Sat Sep 12, 2020 11:29 pm

Re: New release of EightyOne available

Post by Spinnetti »

Fruitcake wrote: Tue Feb 08, 2022 1:01 pm
Spinnetti wrote: Tue Feb 08, 2022 3:13 am my random functions don't randomize because the frame counter is always the same when I start the program - any chance FRAMES could be randomized on startup?
The thing to keep in mind is that when you load a program into a real ZX81 then this is the behaviour you get there also. If the behaviour of EightyOne were changed as you suggest then it would no longer being emulating the behaviour of a real system.

To tackle this, what your program should do is allow the Frames counter to clock up for a varying length of time before you use it to seed your random number generation. An easy way to do this is to wait for the user to press a key to move onto the next title screen or to begin a game, etc. It's very unlikely they would always press a key after exactly the same number of TV frames have elapsed, and hence the user in effect provides the seed for the random number generator! If using RND from BASIC then you would simply execute RAND once the user has pressed a key.
Got it, thanks for the feedback!
Zeddy: ZX80, ZX81/ZXpand, TS1000/ZXpand, TS1500/Zxpand+
Speccy: 48k, +, +2, +3, TS2068, "Bare Metal" Pi, Next KS2, IF1/Microdrives/Vdrive/Light Gun/VGA-Joy
QL: Minerva/QL-VGA/Custom PSU
C5: 24v, LiFE battery, Disc brakes
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: New release of EightyOne available

Post by Fruitcake »

A new release of EightyOne is now available, which fixes a number of bugs. It is available here.
Spinnetti
Posts: 252
Joined: Sat Sep 12, 2020 11:29 pm

Re: New release of EightyOne available

Post by Spinnetti »

Awesome, thanks guys! - And special thanks to "Sir Morris" for the joypad button change!

Did some testing, and when using WRX (I have WRX, XON sound and ZXPAND selected in settings, and ZX81 16k) There seems to be some screen memory corruption not present in 1.26 presenting as variable horizontal lines at the bottom of the screen past the normal working area. It also changes patterns as I move the little character around. any ideas?
wrxglitch.jpg
Zeddy: ZX80, ZX81/ZXpand, TS1000/ZXpand, TS1500/Zxpand+
Speccy: 48k, +, +2, +3, TS2068, "Bare Metal" Pi, Next KS2, IF1/Microdrives/Vdrive/Light Gun/VGA-Joy
QL: Minerva/QL-VGA/Custom PSU
C5: 24v, LiFE battery, Disc brakes
Post Reply