EmulatorArchive / fbzx-wii

Automatically exported from code.google.com/p/fbzx-wii
GNU General Public License v3.0
1 stars 0 forks source link

Tapes auto-rewind when stopped #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load a multi-level game
2. Wait for the menu to load.
3. Start game, first level is supposed to be loaded next

What is the expected output? What do you see instead?
When you press Play, the tape starts all over again from the beginning. It 
should continue where it stopped.

What version of the product are you using? On what operating system?
Version 9

Please provide any additional information below.
This also makes it impossible to load anything but the first game in multi-game 
tapes.

Original issue reported on code.google.com by iceknigh...@gmail.com on 21 Jan 2013 at 11:23

GoogleCodeExporter commented 9 years ago
Please provide an example of game with this problem.

Original comment by olimpier...@gmail.com on 21 Jan 2013 at 1:28

GoogleCodeExporter commented 9 years ago
Here's some examples:

-Out Run (TZX): After the menu loads, press 1 to start and you'll be p`rompted 
to start the tape. Go to the emulator's menu and press "Play", but nothing will 
seemingly happen. Press "Play" again and the tape will be played from the start.

-Caramelos y Batalla naval (TAP): You can only load "Caramelos".

-E-Motion (TAP): Has 48K and 128K versions one after the other, so only the 48K 
version can be loaded here.

Original comment by iceknigh...@gmail.com on 21 Jan 2013 at 5:07

Attachments:

GoogleCodeExporter commented 9 years ago
Another example, Ghostbusters 2 is impossible to load in TAP format.

Original comment by iceknigh...@gmail.com on 21 Jan 2013 at 5:36

Attachments:

GoogleCodeExporter commented 9 years ago
"Out of run" does not work since "the block selection" is not yet implemented.

It is the issue 30

Original comment by olimpier...@gmail.com on 27 Jan 2013 at 9:51

GoogleCodeExporter commented 9 years ago
For the other files, the problem is that the tape is rewound after the reset.

I will insert an option for not rewinding the tape after the reset.

Original comment by olimpier...@gmail.com on 27 Jan 2013 at 10:24

GoogleCodeExporter commented 9 years ago
Still, that doesn't explain why Ghostbusters 2 can't be loaded. I still can't 
use that TAP file in the new version you posted.

Original comment by iceknigh...@gmail.com on 28 Jan 2013 at 2:03

GoogleCodeExporter commented 9 years ago
Just found out that I can't load Deliverance either, probably for the same 
reason.

Original comment by iceknigh...@gmail.com on 28 Jan 2013 at 3:10

Attachments:

GoogleCodeExporter commented 9 years ago
I succeded in loading both Ghostbusters 2 and Deliverance.
In Ghostbusters 2 you have to stop the tape as soon as the scrolling text 
appears, waiting that the scrolling text reaches the end and then play the tape.

In Deliverance you have to stop the tape as soon as the menu appears, select 1 
and play the tape.

With this games maybe it is better .tzx files since this format has the 
information for the emulator on when stopping the tape.  

Original comment by olimpier...@gmail.com on 29 Jan 2013 at 1:16

GoogleCodeExporter commented 9 years ago
Oh, I thought TAP files were supposed to stop automatically, as long as the 
emulated Spectrum is not sending a LOAD command?

At least that's how they seem to behave in every emulator I've ever tried...

Original comment by iceknigh...@gmail.com on 29 Jan 2013 at 2:19

GoogleCodeExporter commented 9 years ago
I modified the instant loading routine and implemented also for TZX file.

Now, many more files are instant loaded although some files still have some 
problems (but they have problems also with other emultors e.g. Fuse)  

If the emulator stops, try to play the tape. This occours when the tape has a 
loader (e.g. Speedlock).

Please let me now the troubled tapes you find.

Original comment by olimpier...@gmail.com on 6 Feb 2013 at 5:53

Attachments:

GoogleCodeExporter commented 9 years ago
Nice work! I haven't had a problem with any of the TAP files I've tried.

Here's a couple of things I've noticed regarding TZX files:

In the tests I've been running so far, every TZX file I've tried with 
non-standard blocks has required me to go into the menu and manually press play 
right after the standard blocks were loaded.

Perhaps the emulator should only use that instant loading routine when the 
current position of the tape is a standard block? Then, if the next block is 
anything other than a standard block, it would act like if the user had pressed 
"Play". This could be done always without problems in TZX files, since the tape 
only has to stop when it finds a "Stop tape" block.

Also, I've noticed that when a "Stop Tape" block is present right after some 
standard blocks (Altered Beast), the next time you press "Play", that "stop 
Tape" block will be read and the tape will be instantly stopped, so you have to 
go into the menu and press "Play" once more.

The solution I just posted would also get rid of this second problem, since the 
emu would detect a non-standard block and keep playing the tape, then finding a 
"Stop Tape" command and effectually stopping it.

If this is implemented, I'd advise to add an "Ignore pause values in standard 
blocks" option (maybe shortened to something like "Standard block pauses: 
On/Off"), since the loader might actually need a pause between the last 
standard block and the first non-standard block. This option would read the 
pause after each block from the TZX.

Additionally, this option would allow to see the loading screens at least for a 
brief time, which is always nice. :)

Original comment by iceknigh...@gmail.com on 6 Feb 2013 at 11:16

GoogleCodeExporter commented 9 years ago
The file I posted yesterday has the debug option enabled and it creates a log 
file which could become very big if you use the emulator for a long time.

To avoid any problem, please use this file.

Original comment by olimpier...@gmail.com on 7 Feb 2013 at 11:04

Attachments:

GoogleCodeExporter commented 9 years ago
In the posted file I also changed the sample frequency from 48KHz to 32KHz to 
eliminate the high frequencies.

Please check if you hear any improvment in the sound. 

Original comment by olimpier...@gmail.com on 7 Feb 2013 at 11:36

GoogleCodeExporter commented 9 years ago
The exact same sound artifacts seem to still be present in the 48K sound, but 
now everything seems to sound worse... Not only the 48K music, but the 128K 
sound and even the tape loading noise. =\

Original comment by iceknigh...@gmail.com on 8 Feb 2013 at 12:22

GoogleCodeExporter commented 9 years ago
Ok thanks. It is better to roll back to 48K

Original comment by olimpier...@gmail.com on 8 Feb 2013 at 10:08

GoogleCodeExporter commented 9 years ago
About TZX auto play I had had the same idea, but before implenting it I wanted 
to test the manual version.
In the attached file the tape automatically plays when a non standard block is 
found.
Before playing, the emulator pauses for 1.5 seconds to allow the loader to run. 
I tested more than 50 files and this time is sufficient for all except for 
Altered Beast which would require 5 seconds. It is not worth setting this so 
long time for only one game. So Altered Beast now requires instant loading set 
off to work.   

Original comment by olimpier...@gmail.com on 10 Feb 2013 at 4:59

Attachments:

GoogleCodeExporter commented 9 years ago
I have just realized that the pause information is inside the tzx file.
So I can manage to allow Altered Beast to work.

Original comment by olimpier...@gmail.com on 10 Feb 2013 at 5:56

GoogleCodeExporter commented 9 years ago
This file works also with Altered Beast.

Original comment by olimpier...@gmail.com on 10 Feb 2013 at 8:53

Attachments:

GoogleCodeExporter commented 9 years ago
Anyhow I found a file which needs the play command (Shadow of the beast) since 
there is a standard block which can not be loaded with the instant routine.

Original comment by olimpier...@gmail.com on 10 Feb 2013 at 9:00

GoogleCodeExporter commented 9 years ago
Thanks, this is a pretty useful improvement!

I'll try as many games as I can with this version and tell you if I can find 
any problematic games. For now, my attached copy of Road Blasters seems to get 
stuck for some reason (works in other emulators).

Why does the tape stop in Shadow of the beast, though? Even if the next block 
is a standard one, as long as there's no "stop tape" command it should keep 
loading the following block in "turbo mode" instead of "instant mode", 
shouldn't it?

By the way, would it be possible to add the option to always use the pauses 
specified in all the TZX blocks? This way, TZXs would allow to see the loading 
screens while of course TAP files would still always load instantly.

Original comment by iceknigh...@gmail.com on 10 Feb 2013 at 9:51

Attachments:

GoogleCodeExporter commented 9 years ago
Army Moves also seems to stop the tape without being told to.

Original comment by iceknigh...@gmail.com on 10 Feb 2013 at 10:01

Attachments:

GoogleCodeExporter commented 9 years ago
Barbarian II stops the tape before the "Stop tape" block instead of after 
reading it, so when you play the tape after selecting the character, it stops 
automatically as it finds the "Stop tape" block.

This seems to be again caused by the tape stopping without being told to. As 
I've understood, TZXs should never be stopped by anything else but the pauses 
between blocks and the "Stop tape" block.

Original comment by iceknigh...@gmail.com on 10 Feb 2013 at 10:16

Attachments:

GoogleCodeExporter commented 9 years ago
Bat Man (Jon Ritman's) also stops before the title screen.

Please note that the problem with Road Blasters seems to be different, since 
that one keeps playing the tape as normal but can't seem to load the second 
non-standard block.

Original comment by iceknigh...@gmail.com on 10 Feb 2013 at 10:27

Attachments:

GoogleCodeExporter commented 9 years ago
More games that stop when there's no "Stop tape" block present:

-Desperado
-Dynamix
-Spirits
-Uridium
-Whopper Chase

Original comment by iceknigh...@gmail.com on 10 Feb 2013 at 11:46

Attachments:

GoogleCodeExporter commented 9 years ago
All these games (except Barbarian II) have the same file structure as Shadow of 
the Beast.
Anyhow I can fix the issue for all of them.

The manage of instant loading is not so simple.

The emulator starts the fast loading routine when the game calls the loading 
routine inside the zx rom. This happens only the standard block. The tape is 
not yet activated in this case.

In the dol versione, I posted, the tape is activated only when there is a non 
standard block. Now I also have to include the case of a standard block without 
an header file as in the case of SOB and the other files.

Original comment by olimpier...@gmail.com on 12 Feb 2013 at 9:30

GoogleCodeExporter commented 9 years ago
Road Blasters does not work since it has a Speedlock 4 and Speedlock 5 
protection.
I found out the FBZX Wii has problems to work with some games with Speedlock 4, 
5, 6 and 7.

Speedlock is a very sofisticated protection scheme that uses also undocumented 
Z80 instructions and flags. 

I am investingation on it.

Original comment by olimpier...@gmail.com on 12 Feb 2013 at 9:47

GoogleCodeExporter commented 9 years ago
Regarding the instant load handling...

Rather than activating it depending on the tape blocks, wouldn't it be possible 
to detect if the Spectrum is currently using its own standard tape load routine 
present in the ROM, and then deactivate it when said routine is no longer being 
used?

If such a thing could be detected, you might get a 100% success when loading 
non-standard tapes.

Original comment by iceknigh...@gmail.com on 12 Feb 2013 at 5:22

GoogleCodeExporter commented 9 years ago
The routine is generally called several times in a game (once for each block) 
so it is not simple to determine when the the game does not need the ROM 
routine anymore.
There are games where the routine is called a second time after a menu 
selection.

Anyhow I better looked at the files you posted and I realized that only few of 
them have standard blocks where it is necessary a manual play command.
For the other I have alredy fixed the issue.

It is not convinient to implemnet an autoplay for the standard block since in 
many cases it is usefull that the tape does not start (e.g. Dragon's Lair, 
Ghostbusters 2 and more)

Original comment by olimpier...@gmail.com on 13 Feb 2013 at 6:10

GoogleCodeExporter commented 9 years ago
There is a solution I can think of, though: Not treating TAP and TZX files as 
the same thing.

-TAP files always consist exclusively of standard blocks, so they should be 
played as they currently are (automatically stopping unless there's a load 
command).

-TZX files should always be kept playing after standard blocks since, whenever 
they must be stopped, there should always be a "Stop tape" block in there.

I think that would be the best possible solution, please let me know what you 
think of it.

Original comment by iceknigh...@gmail.com on 13 Feb 2013 at 7:38

GoogleCodeExporter commented 9 years ago
Tap files and TZX files are alreday diferently managed.

Please, try this version where I fixed most of the issues (I have to fix Road 
Blaster). Only few tzx games require a play command.

I also included CBA sound and qaop joystick.

Original comment by olimpier...@gmail.com on 14 Feb 2013 at 10:35

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. I think I'll be opening separate issues for the individual things that 
have spawned from this one, just so you can have them more organized.

The original issue here has been fixed already, so it can be marked as such.

Original comment by iceknigh...@gmail.com on 14 Feb 2013 at 1:40

GoogleCodeExporter commented 9 years ago
The main issue is fixed in V10

Original comment by olimpier...@gmail.com on 24 Mar 2013 at 6:43