mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
camplynx: added a popmessage to tell user how to load the tape.
This commit is contained in:
parent
810f82fee2
commit
16ed4aae36
@ -23,7 +23,7 @@ Each byte is 8 bits (MSB first) with no start or stop bits.
|
||||
|
||||
********************************************************************/
|
||||
|
||||
#include <assert.h>
|
||||
#include "emu.h" // for popmessage and <string>
|
||||
|
||||
#include "camplynx_cas.h"
|
||||
|
||||
@ -84,13 +84,13 @@ static int camplynx_handle_cassette(INT16 *buffer, const UINT8 *bytes)
|
||||
UINT32 byte_count = 0;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
/* header zeroes */
|
||||
for (i=0; i<555; i++)
|
||||
sample_count += camplynx_output_byte(buffer, sample_count, 0);
|
||||
|
||||
if (bytes[0] == 0x22)
|
||||
{
|
||||
std::string pgmname = " LOAD \"";
|
||||
byte_count++;
|
||||
sample_count += camplynx_output_byte(buffer, sample_count, 0xA5);
|
||||
sample_count += camplynx_output_byte(buffer, sample_count, 0x22);
|
||||
@ -99,14 +99,25 @@ static int camplynx_handle_cassette(INT16 *buffer, const UINT8 *bytes)
|
||||
for (i=1; bytes[i]!=0x22; i++)
|
||||
{
|
||||
if (i < camplynx_image_size)
|
||||
{
|
||||
sample_count += camplynx_output_byte(buffer, sample_count, bytes[i]);
|
||||
pgmname.append<int>(1, bytes[i]);
|
||||
}
|
||||
else
|
||||
return sample_count;
|
||||
byte_count++;
|
||||
}
|
||||
|
||||
pgmname.append<int>(1, 0x22);
|
||||
sample_count += camplynx_output_byte(buffer, sample_count, bytes[byte_count++]); // should be 0x22
|
||||
|
||||
// if a machine-language program, say to use MLOAD
|
||||
if (bytes[byte_count] == 0x4D)
|
||||
pgmname[0] = 0x4D;
|
||||
|
||||
// Tell user how to load the tape
|
||||
popmessage("%s",pgmname.c_str());
|
||||
|
||||
/* data zeroes */
|
||||
for (i=0; i<555; i++)
|
||||
sample_count += camplynx_output_byte(buffer, sample_count, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user