Previous 15994 Revisions Next

r3272 Monday 15th September, 2008 at 18:43:01 UTC by Wilbert Pol
[JUPITER] Some tape loading fixes.
[src/mess/drivers]jupiter.c
[src/mess/formats]jupi_tap.c

src/mess/formats/jupi_tap.c
r3271r3272
5959}
6060
6161
62INLINE int jupiter_tap_byte(INT16 *buffer, int sample_pos, UINT8 data)
63{
64   int i, samples;
65
66   samples = 0;
67   for ( i = 0; i < 8; i++ )
68   {
69      if ( data & 0x80 )
70         samples += jupiter_tap_cycle( buffer, sample_pos + samples, 21, 22 );
71      else
72         samples += jupiter_tap_cycle( buffer, sample_pos + samples, 10, 11 );
73
74      data <<= 1;
75   }
76   return samples;
77}
78
79
6280static int jupiter_handle_tap(INT16 *buffer, const UINT8 *casdata)
6381{
6482   int   data_pos, sample_count;
r3271r3272
95113      /* Sync samples */
96114      sample_count += jupiter_tap_cycle( buffer, sample_count, 8, 11 );
97115
116      /* Output block type identification byte */
117      sample_count += jupiter_tap_byte( buffer, sample_count, ( block_size != 0x001A ) ? 0xFF : 0x00 );
118
98119      /* Data samples */
99120      for ( ; block_size ; data_pos++, block_size-- )
100      {
101         UINT8   data = casdata[data_pos];
121         sample_count += jupiter_tap_byte( buffer, sample_count, casdata[data_pos] );
102122
103         for ( i = 0; i < 8; i++ )
104         {
105            if ( data & 0x80 )
106               sample_count += jupiter_tap_cycle( buffer, sample_count, 21, 22 );
107            else
108               sample_count += jupiter_tap_cycle( buffer, sample_count, 10, 11 );
109
110            data <<= 1;
111         }
112      }
113
114123      /* End mark samples */
115124      sample_count += jupiter_tap_cycle( buffer, sample_count, 12, 57 );
116125
src/mess/drivers/jupiter.c
r3271r3272
173173      speaker_level_w(0,0);
174174      data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY7" ) );;
175175   }
176   if ( cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) < 0 )
176   if ( cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) > 0 )
177177   {
178178      data &= ~0x20;
179179   }
r3271r3272
299299   CASSETTE_STOPPED
300300};
301301
302
302303/* machine definition */
303304static MACHINE_DRIVER_START( jupiter )
304305   /* basic machine hardware */
r3271r3272
360361   CONFIG_DEVICE(jupiter_cartslot_getinfo)
361362SYSTEM_CONFIG_END
362363
364
363365/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT      CONFIG    COMPANY   FULLNAME */
364366COMP( 1981, jupiter,  0,      0,      jupiter,  jupiter,   0,        jupiter,   "Cantab",  "Jupiter Ace" , 0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team