Page 21 of 35

Re: New release of EightyOne available

Posted: Tue Jun 22, 2021 5:06 pm
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.

Re: New release of EightyOne available

Posted: Wed Jan 05, 2022 11:38 pm
by Fruitcake
Version 1.24 of EightyOne is now available:
https://sourceforge.net/projects/eighty ... -emulator/

It addresses a number of bugs.

Re: New release of EightyOne available

Posted: Wed Jan 05, 2022 11:44 pm
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.

Re: New release of EightyOne available

Posted: Mon Feb 07, 2022 11:11 pm
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.

Re: New release of EightyOne available

Posted: Tue Feb 08, 2022 3:13 am
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)

Re: New release of EightyOne available

Posted: Tue Feb 08, 2022 1:01 pm
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.

Re: New release of EightyOne available

Posted: Tue Feb 08, 2022 11:35 pm
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.

Re: New release of EightyOne available

Posted: Sat Feb 12, 2022 5:12 am
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!

Re: New release of EightyOne available

Posted: Wed Mar 23, 2022 11:04 pm
by Fruitcake
A new release of EightyOne is now available, which fixes a number of bugs. It is available here.

Re: New release of EightyOne available

Posted: Thu Mar 24, 2022 3:51 am
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