Again SVI-3x8

Page 4/6
1 | 2 | 3 | | 5 | 6

By Manuel

Ascended (13218)

Manuel's picture

12-03-2017, 18:03

"Stubborn with our principles".... OK, so be it. Our principles are that we emulate hardware as accurately as possible. Cassette interface hardware works with a 1-bit interface. So that's what we emulate. It enables accuracy, as it can handle any signal that a real MSX would also be able to handle. Yes, that's our principle and we'll stick to it.

As you already indicated, CAS files and the like has nothing to do with emulation. It's a hack. So the only way to properly load CAS files is to convert them back to that binary signal, which is realized through the WAV file. (Strictly not the same, but very similar to the real tape of course.)

Also, can you explain when a CAS file is not convertible to WAV? The Cas2Wav conversion we use introduces the proper silences.

By NYYRIKKI

Enlighted (4599)

NYYRIKKI's picture

12-03-2017, 18:25

Manuel wrote:

Also, can you explain when a CAS file is not convertible to WAV? The Cas2Wav conversion we use introduces the proper silences.

In case with Red Zone the problem is the loader that uses SVI BASIC's "SOUND ON:MOTOR ON" trick to play the "sample" (not really sample as it is analog audio) to the user before the actual game is loaded. When this is converted to .CAS the audio will be ripped away and the user will hear only silence (well actually I later learned that this unfortunately happens also if the user has SV-904 cassette deck instead of SV-903) but the game will still load correctly. If this is again converted back to to WAV you don't know how long the original analog audio part was, so you probably don't include enough long silence. (In this particular case the analog part is 22 seconds long, but it could be anything.)

If you wonder that this is only SVI problem, I must say that in MSX this same method could be used by transferring data from cassette input to PPI with help from CPU... Sound quality would be worse, but problem is same.

By Louthrax

Paragon (1465)

Louthrax's picture

12-03-2017, 18:50

But as you mentioned, the MSX .CAS files can't contain any real audio data, just standard MSX-formated binary, BASIC or "raw" blocks of data. So the problem here is more that all .WAV files can't be converted to .CAS ?

By NYYRIKKI

Enlighted (4599)

NYYRIKKI's picture

12-03-2017, 19:10

Louthrax wrote:

But as you mentioned, the MSX .CAS files can't contain any real audio data, just standard MSX-formated binary, BASIC or "raw" blocks of data. So the problem here is more that all .WAV files can't be converted to .CAS ?

Yes indeed this is the root issue... What I'm trying to say that it makes no sense to try to guess what was in the original tape when you don't have the information available and there is no absolute need to do that.

If you have old car that is so rusty that your leg goes straight trough the floor when you hop in, it does not make sense to give it a nice and shiny paint job... It will still be rusty old piece of crap and you will end up wasting both time and money... In this particular case you will end up wasting development time and end user's time.

By Manuel

Ascended (13218)

Manuel's picture

12-03-2017, 23:00

NYYRIKKI: I was trying to integrate your SVI version of cashandler. It works, except for the tapedeck trick: at the end you also insert the cas file in the native cassetteplayer, probably to trigger the auto-load-instruction and to give the normal response. But this doesn't work for the SVI CAS file as the openMSX CAS support doesn't recognize the format....

I guess that trick should be skipped for SVI...

By Manuel

Ascended (13218)

Manuel's picture

12-03-2017, 23:24

OK, I just use typeload for SVI instead. Check out the final version I cooked up here: https://github.com/openMSX/openMSX/blob/master/share/scripts...

Please let me know if there are still bugs left...

By Manuel

Ascended (13218)

Manuel's picture

12-03-2017, 23:30

NYYRIKKI wrote:

Ha! I found the command "utils::get_machine_display_name", so here is SVI-3x8 updated version of _type_via_keybuf.tcl

Here it is how I did it (robust against name changes): https://github.com/openMSX/openMSX/commit/f1abd08210cc9b9297...
Thanks! :)

By Manuel

Ascended (13218)

Manuel's picture

12-03-2017, 23:55

NYYRIKKI wrote:

Yet another command converted for SVI usage called "listing"... I also added handling of single precision and double precision number support as lack of those caused the script to fail decoding of rest of the source.

Great! I'll commit this separately. There is still difference in output when I use the listing command in 'list' in basic though: in basic I get # behind the number.... shouldn't that also be done by the listing command? (What does that # mean anyway??)

Actually, the parser fails if there are MSX/SVI characters used in strings :) Well, whatever, it was an example tool anyway ;-)

Here's what I made of it: https://github.com/openMSX/openMSX/commit/1d7da109ff77393a63...

By NYYRIKKI

Enlighted (4599)

NYYRIKKI's picture

13-03-2017, 09:23

Those changes looks good, but they don't work in my environment due to lacking "machine_info type"-command... I think I need to update my installation first.

Manuel wrote:

There is still difference in output when I use the listing command in 'list' in basic though: in basic I get # behind the number.... shouldn't that also be done by the listing command? (What does that # mean anyway??)

Well yes... The "#" means just that the number is double precision similar as "!" means the number is single precision and "%" means it is integer. This is not a fatal error as the BASIC adds that automatically if it is not in the listing. If you want to add it to output the rule is: If there is no "E"-letter in the output string then add "#" to end of output string.

BTW I'm quite sure there is more easy way to do the conversion than using single "peeks", but I left that for you to fix. Tongue

By NYYRIKKI

Enlighted (4599)

NYYRIKKI's picture

13-03-2017, 18:06

Manuel wrote:

Actually, the parser fails if there are MSX/SVI characters used in strings Smile Well, whatever, it was an example tool anyway ;-)

Oh dear (in the headlights)... Here is another version of _example_tools.tclthat fixes these issues... plus a few more.

Page 4/6
1 | 2 | 3 | | 5 | 6
My MSX profile