Previous Thread
Next Thread
Print Thread
Page 5 of 14 1 2 3 4 5 6 7 13 14
judge #52931 08/20/09 06:19 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By judge
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

Ensjo #52935 08/20/09 06:55 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
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:
Code:
  1     0
+-+ +---+
| | |   |   |
  +-+   +---+

But instead it's generating:
Code:
  1     0
  +-+   +---+
| | |   |   |
+-+ +---+

It seems the +1.0 and -1.0 below should be switched:
Code:
  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.
Ensjo #52964 08/21/09 11:38 AM
Joined: Feb 2005
Posts: 449
C
Senior Member
Offline
Senior Member
C
Joined: Feb 2005
Posts: 449
Cassette output polarity swapped, and hopefully fixed graphics modes in svn now.

Curt Coder #52965 08/21/09 12:26 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By Curt Coder
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.
Code:
  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.
Ensjo #52966 08/21/09 12:47 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
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...

Code:
UINT8 mc1000_get_char_rom(running_machine *machine, UINT8 ch,int line)
{
   return ch;
}

Then @ VIDEO_START:
Code:
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
Code:
POKE 245,33

but that's how it works, so here you have it.

Last edited by Ensjo; 08/21/09 01:00 PM.
Ensjo #52969 08/21/09 01:50 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
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:
Code:
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:
Code:
 1732             /* semigraphics 6 */
 1733             ch = (byte & 0x3F) + 0x60;
 1734             *fg = ((byte >> 5) & 0x03) + ((attr & M6847_CSS) ? BUFF : GREEN);

">> 5" should be ">> 6".

Ensjo #52970 08/21/09 04:11 PM
Joined: Jul 2007
Posts: 4,625
A
Very Senior Member
Offline
Very Senior Member
A
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;



Ensjo #52971 08/21/09 04:36 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 Anna Wu
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.

Anna Wu #52972 08/21/09 04:42 PM
Joined: Apr 2004
Posts: 1,556
J
Very Senior Member
Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,556
Anna Wu: Could you send me that .wav file?

judge #52973 08/21/09 04:50 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 judge
Anna Wu: Could you send me that .wav file?


No

but I can show you the posted Link > "aqui" smile


Page 5 of 14 1 2 3 4 5 6 7 13 14

Link Copied to Clipboard
Who's Online Now
0 members (), 27 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,070
Posts118,932
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