|
Joined: Jul 2009
Posts: 78
Member
|
Member
Joined: Jul 2009
Posts: 78 |
At what frequencies are the signals stored on tape? 1200hz and 2400hz? According to my analysis of .wav recorded directly from the MC-1000 MIC port, each short (bit 1) wave (1 peak + 1 valley) takes about 16 samples at 22050 samples per second. That gives 5512.5 waves per second. The long (bit 0) wave is twice as long, so half the frequency. Then, if my calculations are right: short (bit 1) wave: 5512.5 Hz long (bit 0) wave: 2756.25 Hz
|
|
|
|
Joined: Jul 2009
Posts: 78
Member
|
Member
Joined: Jul 2009
Posts: 78 |
By the way... Curt, I see that the .WAV file generated by M.E.S.S. MC-1000 is the inverse of what is generated by a real MC-1000: instead of peaks and valleys of the same length, we have valleys and peaks. Example: a bit sequence "10" should generate:
1 0
+-+ +---+
| | | | |
+-+ +---+
But instead it's generating:
1 0
+-+ +---+
| | | | |
+-+ +---+
It seems the +1.0 and -1.0 below should be switched:
301 static WRITE8_DEVICE_HANDLER( keylatch_w )
302 {
303 mc1000_state *state = device->machine->driver_data;
304
305 state->keylatch = data;
306
307 cassette_output(state->cassette, BIT(data, 7) ? +1.0 : -1.0);
308 }
Last edited by Ensjo; 08/20/09 06:58 PM.
|
|
|
|
Joined: Feb 2005
Posts: 449
Senior Member
|
Senior Member
Joined: Feb 2005
Posts: 449 |
Cassette output polarity swapped, and hopefully fixed graphics modes in svn now.
|
|
|
|
Joined: Jul 2009
Posts: 78
Member
|
Member
Joined: Jul 2009
Posts: 78 |
The screen changes colors a couple of times during loading, but after the tape ends, there is no program. I wonder it that's caused by the same problem that I identified before, regarding the polarity of the cassette output. Maybe the polarity of the cassette INPUT is also inverted? Try to change the "<" sign below into ">" or ">=" and see if you can successfully LOAD the .wav files generated by BIN2WAV.EXE.
345 if (cassette_input(state->cassette) < +0.0) data &= 0x7f;
Edit: On a second thought, maybe you should try "<=" too.
Last edited by Ensjo; 08/21/09 12:50 PM.
|
|
|
|
Joined: Jul 2009
Posts: 78
Member
|
Member
Joined: Jul 2009
Posts: 78 |
Hey, Curt. More on the video modes... MC-1000 doesn't provide the external ROM that MC6847 may use to get the characters bytes when it is in "External Alphanumerics" mode (AG=0, AS=0, INTEXT=1). Currently the emulation doesn't provide a cfg.get_char_rom at VIDEO_START, and thus it works as if a byte 0x00 is read. In the actual machine, though, MC6847 puts the character code byte into the wires trying to reach the external character ROM, and then reads the wires again for the pattern... but it gets the very same byte that it put there, i.e., the ASCII code of the character. I think you could add something like...
UINT8 mc1000_get_char_rom(running_machine *machine, UINT8 ch,int line)
{
return ch;
}
Then @ VIDEO_START: cfg.get_char_rom = mc1000_get_char_rom; The result is not usefull at all, as you can see by accessing this MC-1000 Java emulator and typing but that's how it works, so here you have it.
Last edited by Ensjo; 08/21/09 01:00 PM.
|
|
|
|
Joined: Jul 2009
Posts: 78
Member
|
Member
Joined: Jul 2009
Posts: 78 |
Hey, Curt, there's a bug in the MC6847 implementation! Compare this code in current M.E.S.S. MC-1000 and in BrMC-1000:
10 GR : OUT 128,96
20 FOR A = 0 TO 255
30 POKE 32768 + A, A
40 NEXT
50 CALL 49158 : REM PRESS ANY KEY TO EXIT
60 TEXT
(Real MC-1000 works just like BrMC-1000 here.) The difference is due to an error in http://git.redump.net/cgit.cgi/mess/tree/src/mess/video/m6847.c:
1732 /* semigraphics 6 */
1733 ch = (byte & 0x3F) + 0x60;
1734 *fg = ((byte >> 5) & 0x03) + ((attr & M6847_CSS) ? BUFF : GREEN);
">> 5" should be ">> 6".
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
I will check following possibilities :
if (cassette_input(state->cassette) <= +0.0) data &= 0x7f; or if (cassette_input(state->cassette) > +0.0) data &= 0x7f; or if (cassette_input(state->cassette) >= +0.0) data &= 0x7f;
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
I will check following possibilities :
if (cassette_input(state->cassette) <= +0.0) data &= 0x7f; or if (cassette_input(state->cassette) > +0.0) data &= 0x7f; or if (cassette_input(state->cassette) >= +0.0) data &= 0x7f; Test data : aventura.wav (168522 bytes) I tried, the tape is playing but still ignore the end of tape time (No OK). PS:For each possibility, the mc1000.o file was deleted before.
|
|
|
|
Joined: Apr 2004
Posts: 1,563 Likes: 12
Very Senior Member
|
Very Senior Member
Joined: Apr 2004
Posts: 1,563 Likes: 12 |
Anna Wu: Could you send me that .wav file?
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
Anna Wu: Could you send me that .wav file? No but I can show you the posted Link > "aqui" 
|
|
|
0 members (),
131
guests, and
0
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,345
Posts122,350
Members5,082
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|