Previous Thread
Next Thread
Print Thread
Page 3 of 14 1 2 3 4 5 13 14
Ensjo #52648 08/13/09 06:35 PM
Joined: Jul 2007
Posts: 4,625
A
Very Senior Member
Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Originally Posted By Ensjo
I'm still new to M.E.S.S., so I still need to discover how to do it. smile Are the .WAV files all that we need?


Yes.
If you use the MESS GUI you will see the supported devices and the supported image types.

Anna Wu #52654 08/13/09 08:07 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By Anna Wu
The tape is playing but ignore the end of tape time.


Indeed, I just see that the line of code that would bring the cassette data into the machine is commented (I don't know why, that seems correct to me):

http://git.redump.net/cgit.cgi/mess/tree/src/mess/drivers/mc1000.c#n326

// data &= (((cassette_input(state->cassette) < +0.0) << 7) | 0x7f);

(The sound of the cassette becomes 0 or 1, and becomes the most signifying bit of the byte that is served by the selected port.)

Ensjo #52658 08/13/09 08:19 PM
Joined: Apr 2004
Posts: 1,556
J
Very Senior Member
Online Content
Very Senior Member
J
Joined: Apr 2004
Posts: 1,556
It could be me, but I'd kinda expect to see something like:
Code:
data &= (((cassette_input(state->cassette) < +0.0 ? 0 : 1) << 7) | 0x7f);


or

Code:
data &= (((cassette_input(state->cassette) < +0.0 ? 1 : 0) << 7) | 0x7f);

Ensjo #52676 08/14/09 04:36 AM
Joined: Dec 1999
Posts: 1,178
Likes: 2
J
Very Senior Member
Offline
Very Senior Member
J
Joined: Dec 1999
Posts: 1,178
Likes: 2
Originally Posted By Ensjo
I only have access to mess.redump.net, where I've downloaded 0.132 from.


Thanks for reminding me to go upload 0.133 to mess.redump.net smile

Justin #52680 08/14/09 07:43 AM
Joined: Jan 2005
Posts: 53
S
Member
Offline
Member
S
Joined: Jan 2005
Posts: 53
As it happens, I have a CCE MC-1000 at home (doesn't everybody in Wales?). I can try and save out a BASIC "Hello World" program to a WAV file if you want...?


Ian Gledhill
Check out our shop of 8-bit goodness http://www.mutant-caterpillar.co.uk/shop/
Spirantho #52683 08/14/09 09:26 AM
Joined: Apr 2004
Posts: 1,556
J
Very Senior Member
Online Content
Very Senior Member
J
Joined: Apr 2004
Posts: 1,556
I suppose that would be useful for debugging.

Spirantho #52684 08/14/09 09:31 AM
Joined: Feb 2005
Posts: 449
C
Senior Member
Offline
Senior Member
C
Joined: Feb 2005
Posts: 449
Originally Posted By Spirantho
As it happens, I have a CCE MC-1000 at home (doesn't everybody in Wales?). I can try and save out a BASIC "Hello World" program to a WAV file if you want...?


Please do, I don't have any CCE WAV files to test with.

Curt Coder #52872 08/19/09 04:04 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By Curt Coder
I don't have any CCE WAV files to test with.


Have you tried to use these (MS-DOS) applications for converting .BAS files into .WAV files?

http://mc-1000.wikispaces.com/Cassete#toc0

Download the .zip file linked by the word "aqui", then you can use the four applications:

BAS2BIN.EXE filename.BAS

From a plain text file containing a BASIC program, generates a filename.BIN containing all the bytes that are to be saved to tape (header, then the tokenized version of the program).

You can get a handful of BASIC programs here.

BIN2WAV.EXE filename.BIN

Generates a filename.WAV file from the .BIN file. The .WAV file generated has an unusual sample rate of 2757 samples/second (instead of 44100 or something like that), tuned to produce .WAV files as small as possible, with one sample per peak or valley. But the sound seems to get distorted in some players. For instance, it plays well in Windows Sound Recorder, but differently in Windows Media Player. (Higher frequency becomes mute.) Would M.E.S.S. read them well?

WAV2BIN.EXE filename.WAV

Analyzes a .WAV file to generate a .BIN file. Accepts files with any sample rate.

LISTBIN.EXE filename.BIN

Lists the BASIC program contained in a .BIN file. It doesn't generate a .BAS file, but you can redirect (>) the output to a file.

NOTE: These applications were made with an old QuickBasic, so file names must have no more than 8 characters.

Last edited by Ensjo; 08/19/09 04:09 PM. Reason: Note added.
Ensjo #52880 08/19/09 05:55 PM
Joined: Jul 2007
Posts: 4,625
A
Very Senior Member
Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Originally Posted By Ensjo
Originally Posted By Curt Coder
I don't have any CCE WAV files to test with.


Have you tried to use these (MS-DOS) applications for converting .BAS files into .WAV files?

http://mc-1000.wikispaces.com/Cassete#toc0

Download the .zip file linked by the word "aqui", then you can use the four applications:

BAS2BIN.EXE filename.BAS

From a plain text file containing a BASIC program, generates a filename.BIN containing all the bytes that are to be saved to tape (header, then the tokenized version of the program).

You can get a handful of BASIC programs here.

BIN2WAV.EXE filename.BIN

Generates a filename.WAV file from the .BIN file. The .WAV file generated has an unusual sample rate of 2757 samples/second (instead of 44100 or something like that), tuned to produce .WAV files as small as possible, with one sample per peak or valley. But the sound seems to get distorted in some players. For instance, it plays well in Windows Sound Recorder, but differently in Windows Media Player. (Higher frequency becomes mute.) Would M.E.S.S. read them well?

WAV2BIN.EXE filename.WAV

Analyzes a .WAV file to generate a .BIN file. Accepts files with any sample rate.

LISTBIN.EXE filename.BIN

Lists the BASIC program contained in a .BIN file. It doesn't generate a .BAS file, but you can redirect (>) the output to a file.

NOTE: These applications were made with an old QuickBasic, so file names must have no more than 8 characters.


I tried without success. See my older posting.

Originally Posted By Anna Wu
The tape is playing but ignore the end of tape time.

Ensjo, I made following :

1.) Convert the .bas file to .bin (BAS2BIN)
2.) Convert the .bin file to .wav (BIN2WAV)

judge #52888 08/19/09 08:14 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By Anna Wu
I tried without success. See my older posting.

Originally Posted By Anna Wu
The tape is playing but ignore the end of tape time.

Ensjo, I made following :

1.) Convert the .bas file to .bin (BAS2BIN)
2.) Convert the .bin file to .wav (BIN2WAV)


Anna, but you did manage to produce a .wav file with the programs, right? That's one thing. That the emulator still can't read the .wav files is another issue. But .wav files will be needed to make the tests, that's why I explained about these applications.

Curt: Why is this line commented in the code?
Code:
// data &= (((cassette_input(state->cassette) < +0.0) << 7) | 0x7f);

This prevents the emulator from "hearing" the .wav files. Is the line commented because it generates some error? Does this suggestions from Judge solve the problem?

Originally Posted By judge
It could be me, but I'd kinda expect to see something like:
Code:
data &= (((cassette_input(state->cassette) < +0.0 ? 0 : 1) << 7) | 0x7f);

or
Code:
data &= (((cassette_input(state->cassette) < +0.0 ? 1 : 0) << 7) | 0x7f);

Page 3 of 14 1 2 3 4 5 13 14

Link Copied to Clipboard
Who's Online Now
2 members (judge, Dorando), 27 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,087
Posts119,099
Members5,014
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com