Previous 15994 Revisions Next

r2785 Saturday 31st May, 2008 at 16:07:42 UTC by Miodrag Milanović
[RADIO86] Cassette support + various fixes
[src/mess/drivers]radio86.c
[src/mess/includes]radio86.h
[src/mess/machine]radio86.c
[src/mess/video]i8275.c radio86.c

src/mess/includes/radio86.h
r2784r2785
2121extern I8275_DISPLAY_PIXELS(radio86_display_pixels);
2222
2323extern VIDEO_UPDATE( radio86 );
24extern PALETTE_INIT( radio86 );
2425
2526
2627#endif /* radio86_H_ */
src/mess/video/i8275.c
r2784r2785
104104
105105   UINT8 fifo_buffer_1[16];
106106   UINT8 fifo_buffer_2[16];
107   UINT8 fifo_pos_1;
108   UINT8 fifo_pos_2;
107   UINT8 fifo_write;
109108
110109   int ypos;
111110   int current_row;
r2784r2785
113112   UINT8 cursor_blink_cnt;
114113   UINT8 char_blink_cnt;
115114
115   UINT8 next_in_fifo;
116   
117   UINT8 lineattr;
118   UINT8 rvv;
119   UINT8 gpa;
120   UINT8 hlgt;
121   UINT8 underline;
122   UINT8 blink;
123   
124   UINT8 last_data;
116125};
117126
118127INLINE i8275_t *get_safe_token(const device_config *device)
r2784r2785
321330   UINT8 lc = 0;
322331   UINT8 vsp = 0;
323332   UINT8 lten = 0;
324
333   UINT8 fifo_read = 0;
325334   for(line=0;line<=i8275->lines_per_row;line++) {
326335      if (i8275->undeline_line_num & 0x08) {
327336         vsp = (line==0 || line==i8275->lines_per_row) ? 1 : 0;
328337      }
329338      // If line counter is 1 then select right values
330339      lc = (i8275->line_counter_mode==1) ? (line - 1) % i8275->lines_per_row : line;
331
340      fifo_read = 0;
332341      for(xpos=0;xpos<=i8275->chars_per_row;xpos++) {
333342         UINT8 chr =   (i8275->buffer_used==0) ? i8275->row_buffer_2[xpos] : i8275->row_buffer_1[xpos];
334343
344         if ((chr & 0x80)==0x80) {
345            if ((chr & 0xc0)==0xc0) {
346               // character attribute code
347               i8275->lineattr = 0;
348            } else {
349               // field attribute code
350               i8275->hlgt = chr & 1;
351               i8275->blink = (chr >> 1) & 1;
352               i8275->gpa = (chr >> 2) & 3;
353               i8275->rvv = (chr >> 4) & 1;
354               i8275->underline = (chr >> 5) & 1;
355            }
356                       
357            if (i8275->field_attribute_mode==0) {               
358               chr = (i8275->buffer_used==0) ? i8275->fifo_buffer_2[fifo_read] : i8275->fifo_buffer_1[fifo_read];                 
359               fifo_read = (fifo_read + 1 ) % 16;
360            } else {           
361               vsp = 1;
362            }           
363         }
364         
335365         if ((i8275->current_row == i8275->cursor_row) && (xpos == i8275->cursor_col)) {
336366            int vis = 1;
337367            if ((i8275->cursor_format & 2)==0) {
r2784r2785
351381             i8275->ypos, // y position on screen
352382            lc, // current line of char
353383            (chr & 0x7f),  // char code to be displayed
354            0,  // line attribute code
355            lten,  // light enable signal
356            0,  // reverse video signal
384            i8275->lineattr,  // line attribute code
385            lten | i8275->underline,  // light enable signal
386            i8275->rvv,  // reverse video signal
357387            vsp, // video suppression
358            0,  // general purpose attribute code
359            0  // highlight
388            i8275->gpa,  // general purpose attribute code
389            i8275->hlgt  // highlight
360390         );
361391      }
362392      i8275->ypos++;
r2784r2785
366396
367397void i8275_dack_set_data(const device_config *device, UINT8 data)
368398{
369   i8275_t *i8275 = get_safe_token(device);
370   if(i8275->buffer_used == 0) {
371      i8275->row_buffer_1[i8275->row_pos++] = data;
372   } else {
373      i8275->row_buffer_2[i8275->row_pos++] = data;
399   i8275_t *i8275 = get_safe_token(device);   
400   
401   if (i8275->next_in_fifo == 1)
402   {   
403      i8275->next_in_fifo = 0;
404     
405      if(i8275->buffer_used == 0)
406      {
407         i8275->fifo_buffer_1[i8275->fifo_write] = data & 0x7f;                 
408      }
409      else
410      {
411         i8275->fifo_buffer_2[i8275->fifo_write] = data & 0x7f;
412      }
413      i8275->fifo_write = (i8275->fifo_write + 1) % 16;
414           
415      if (i8275->last_data == 0xf1) {
416         i8275->row_pos = i8275->chars_per_row + 1;
417      }
374418   }
375   if ((i8275->row_pos - 1)==i8275->chars_per_row ) {
419   else
420   {     
421      if(i8275->buffer_used == 0)
422      {
423         i8275->row_buffer_1[i8275->row_pos++] = data;
424      }
425      else
426      {
427         i8275->row_buffer_2[i8275->row_pos++] = data;
428      }
429      if (i8275->field_attribute_mode==0)
430      {
431         if ((data & 0x80)==0x80)
432         {
433            i8275->last_data = data;
434            i8275->next_in_fifo = 1;
435         }
436      }
437   }
438   
439   if ((i8275->row_pos - 1)==i8275->chars_per_row )
440   {
376441      i8275->buffer_used = (i8275->buffer_used==0) ? 1 : 0;
377442      i8275->row_pos = 0;
443      i8275->fifo_write = 0;
378444      i8275_draw_char_line(device);
379445   }
380   if (i8275->ypos >= (i8275->lines_per_row+1) * (i8275->rows_per_frame + 1)) {
446   if (i8275->current_row == (i8275->rows_per_frame + 1))
447   {
381448      i8275->ypos = 0;
382449      i8275->current_row = 0;
383450      i8275->intf->dma_request(device,0);
r2784r2785
388455void i8275_update(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect)
389456{
390457   i8275_t *i8275 = get_safe_token(device);
458   i8275->ypos = 0;
459   i8275->lineattr = 0;
460   i8275->rvv = 0;
461   i8275->gpa = 0;
462   i8275->hlgt = 0;   
463   i8275->underline = 0;
464   i8275->blink = 0;
465   i8275->row_pos = 0;
466   i8275->fifo_write = 0;
467
391468   if ((i8275->status_reg & I8275_STATUS_VIDEO_ENABLE)==0) {
392469      fillbitmap(bitmap, get_black_pen(device->machine), cliprect);
393470   } else {
r2784r2785
397474      // if value < 32 it is visible otherwise not
398475      i8275->char_blink_cnt++;
399476      if(i8275->char_blink_cnt==64) i8275->char_blink_cnt = 0;
400
401477      i8275->intf->dma_request(device,1);
402478   }
403479   if (i8275->status_reg & I8275_STATUS_INTERRUPT_ENABLE) {
r2784r2785
490566   i8275->row_pos = 0;
491567   i8275->buffer_used = 0;
492568
493   i8275->fifo_pos_1 = 0;
494   i8275->fifo_pos_2 = 0;
569   i8275->fifo_write = 0;
495570
496571   i8275->ypos = 0;
497572   i8275->current_row = 0;
498573
499574   i8275->cursor_blink_cnt = 0;
500575   i8275->char_blink_cnt = 0;
576   i8275->next_in_fifo = 0;
577   
578   i8275->lineattr = 0;
579   i8275->rvv = 0;
580   i8275->gpa = 0;
581   i8275->hlgt = 0;   
582   i8275->underline = 0;
583   i8275->blink = 0;
501584}
502585
503586static DEVICE_SET_INFO( i8275 )
src/mess/video/radio86.c
r2784r2785
1010#include "driver.h"
1111#include "video/i8275.h"
1212
13I8275_DISPLAY_PIXELS(radio86_display_pixels)
13I8275_DISPLAY_PIXELS(radio86_display_pixels)
1414{
15   //int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt);
1615   int i;
1716   bitmap_t *bitmap = tmpbitmap;
1817   UINT8 *charmap = memory_region(REGION_GFX1);
r2784r2785
2322   if (lten) {
2423      pixels = 0xff;
2524   }
26   for(i=0;i<6;i++) {
25   if (rvv) {
26      pixels ^= 0xff;
27   }
28   for(i=0;i<6;i++) {     
2729      *BITMAP_ADDR16(bitmap, y, x + i) = (pixels >> (5-i)) & 1;
2830   }
2931}
r2784r2785
3638   return 0;
3739}
3840
41const rgb_t radio86_palette[3] = {
42   MAKE_RGB(0x00, 0x00, 0x00), // black
43   MAKE_RGB(0xa0, 0xa0, 0xa0), // white
44   MAKE_RGB(0xff, 0xff, 0xff)   // highlight
45};
46
47PALETTE_INIT( radio86 )
48{
49   palette_set_colors(machine, 0, radio86_palette, ARRAY_LENGTH(radio86_palette));
50}
51
src/mess/machine/radio86.c
r2784r2785
3232READ8_HANDLER (radio86_8255_portb_r2 )
3333{
3434   UINT8 key = 0xff;
35   if ((radio86_keyboard_mask & 0x01)!=0) { key &= input_port_read_indexed(machine,0); }
36   if ((radio86_keyboard_mask & 0x02)!=0) { key &= input_port_read_indexed(machine,1); }
37   if ((radio86_keyboard_mask & 0x04)!=0) { key &= input_port_read_indexed(machine,2); }
38   if ((radio86_keyboard_mask & 0x08)!=0) { key &= input_port_read_indexed(machine,3); }
39   if ((radio86_keyboard_mask & 0x10)!=0) { key &= input_port_read_indexed(machine,4); }
40   if ((radio86_keyboard_mask & 0x20)!=0) { key &= input_port_read_indexed(machine,5); }
41   if ((radio86_keyboard_mask & 0x40)!=0) { key &= input_port_read_indexed(machine,6); }
42   if ((radio86_keyboard_mask & 0x80)!=0) { key &= input_port_read_indexed(machine,7); }
35   if ((radio86_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); }
36   if ((radio86_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); }
37   if ((radio86_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); }
38   if ((radio86_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); }
39   if ((radio86_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); }
40   if ((radio86_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); }
41   if ((radio86_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); }
42   if ((radio86_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); }
4343   return key;
4444}
4545
4646READ8_HANDLER (radio86_8255_portc_r2 )
4747{
48   return input_port_read_indexed(machine, 8);
48   double level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0));                                               
49   UINT8 dat = input_port_read(machine,"LINE8");
50   if (level <  0) {
51      dat ^= 0x10;
52    }   
53   return dat;   
4954}
5055
5156WRITE8_HANDLER (radio86_8255_porta_w2 )
r2784r2785
117122   dma8257_config(0, &radio86_dma);
118123   dma8257_reset();
119124}
120
121READ8_HANDLER( radio86_keyboard_r )
122{
123   return ppi8255_r((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), offset & 3);
124}
125
126WRITE8_HANDLER( radio86_keyboard_w )
127{
128   ppi8255_w((device_config*)device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ),offset^0x03, data);
129}
130
131READ8_HANDLER( radio86_tape_r )
132{
133   double level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0));
134   if (level <  0) {
135          return 0x00;
136    }
137   return 0xff;
138}
139
src/mess/drivers/radio86.c
r2784r2785
1212#include "machine/8255ppi.h"
1313#include "machine/8257dma.h"
1414#include "video/i8275.h"
15#include "devices/cassette.h"
16#include "formats/rk_cas.h"
1517#include "includes/radio86.h"
1618
1719/* Address maps */
r2784r2785
2729
2830/* Input ports */
2931INPUT_PORTS_START( radio86 )
30   PORT_START /* line 0 */
32   PORT_START_TAG("LINE0")
3133      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
3234      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)
3335      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC)
r2784r2785
3638      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3)
3739      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4)
3840      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5)
39   PORT_START /* line 1 */
41   PORT_START_TAG("LINE1")
4042      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB)
4143      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END)
4244      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
r2784r2785
4547      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
4648      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
4749      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
48   PORT_START /* line 2 */
50   PORT_START_TAG("LINE2")
4951      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
5052      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
5153      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
r2784r2785
5456      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
5557      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
5658      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
57   PORT_START /* line 3 */
59   PORT_START_TAG("LINE3")
5860      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
5961      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
6062      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_EQUALS)
r2784r2785
6365      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
6466      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CODE(KEYCODE_STOP)
6567      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_SLASH)
66   PORT_START /* line 4 */
68   PORT_START_TAG("LINE4")
6769      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE)
6870      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
6971      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
r2784r2785
7274      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
7375      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
7476      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
75   PORT_START /* line 5 */
77   PORT_START_TAG("LINE5")
7678      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
7779      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
7880      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
r2784r2785
8183      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
8284      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
8385      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
84   PORT_START /* line 6 */
86   PORT_START_TAG("LINE6")
8587      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
8688      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
8789      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
r2784r2785
9092      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
9193      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
9294      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
93   PORT_START /* line 7 */
95   PORT_START_TAG("LINE7")
9496      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
9597      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
9698      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
r2784r2785
99101      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
100102      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE)
101103      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
102   PORT_START /* line 8 */
103      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
104      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED)
105      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
106      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED)
107      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
104   PORT_START_TAG("LINE8")
105      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
106      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
107      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
108      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
109      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
108110      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT)
109111      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL)
110112      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
r2784r2785
132134   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
133135   MDRV_SCREEN_SIZE(78*6, 30*10)
134136   MDRV_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1)
135   MDRV_PALETTE_LENGTH(2)
136   MDRV_PALETTE_INIT(black_and_white)
137   MDRV_PALETTE_LENGTH(3)
138   MDRV_PALETTE_INIT(radio86)
137139
138140   MDRV_VIDEO_START(generic_bitmapped)
139141   MDRV_VIDEO_UPDATE(radio86)
140
142   
143   MDRV_SPEAKER_STANDARD_MONO("mono")
144   MDRV_SOUND_ADD(WAVE, 0)
145   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
141146MACHINE_DRIVER_END
142147
148static void radio86_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
149{
150   /* cassette */
151   switch(state)
152   {
153      /* --- the following bits of info are returned as 64-bit signed integers --- */
154      case MESS_DEVINFO_INT_COUNT:            info->i = 1; break;
155      case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE:   info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break;
156      case MESS_DEVINFO_PTR_CASSETTE_FORMATS:      info->p = (void *)rkr_cassette_formats; break;
157
158      default:               cassette_device_getinfo(devclass, state, info); break;
159   }
160}
161
143162/* ROM definition */
144163ROM_START( radio86 )
145164   ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
r2784r2785
164183   ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc))
165184ROM_END
166185
186SYSTEM_CONFIG_START(radio86)
187   CONFIG_DEVICE(radio86_cassette_getinfo);
188SYSTEM_CONFIG_END
189
167190/* Driver */
168191
169192/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT   INIT    CONFIG COMPANY   FULLNAME       FLAGS */
170COMP( 1986, radio86, 0,      0,    radio86,    radio86,radio86, NULL,  "",    "Radio-86RK",   0)
171COMP( 1986, radio4k, radio86, 0,    radio86,    radio86,radio86, NULL,  "",    "Radio-86RK 4k",   0)
172COMP( 1986, spektr01,radio86, 0,    radio86,    radio86,radio86, NULL,  "",    "Spektr-001",   0)
193COMP( 1986, radio86, 0,      0,    radio86,    radio86,radio86, radio86,  "",    "Radio-86RK",   0)
194COMP( 1986, radio4k, radio86, 0,    radio86,    radio86,radio86, radio86,  "",    "Radio-86RK 4k",   0)
195COMP( 1986, spektr01,radio86, 0,    radio86,    radio86,radio86, radio86,  "",    "Spektr-001",   0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team