Previous 15994 Revisions Next

r3593 Wednesday 26th November, 2008 at 18:57:03 UTC by Miodrag Milanović
[MIKRO80][UT88] Enabled
[src/mess]mess.mak messdriv.c
[src/mess/machine]mikro80.c ut88.c

src/mess/messdriv.c
r3592r3593
954954   DRIVER( orao103 )
955955
956956   /* UT-88 */
957//128u4   DRIVER( ut88 )
958//128u4   DRIVER( ut88mini )
957   DRIVER( ut88 )
958   DRIVER( ut88mini )
959959
960960   /* Mikro-80 */
961//128u4   DRIVER( mikro80 )
962//128u4   DRIVER( radio99 )
961   DRIVER( mikro80 )
962   DRIVER( radio99 )
963963
964964   /* Specialist */
965965   DRIVER( special )
src/mess/machine/mikro80.c
r3592r3593
2121   /* set initialy ROM to be visible on first bank */
2222   UINT8 *RAM = memory_region(machine, "main");
2323   memset(RAM,0x0000,0x0800); // make frist page empty by default
24     memory_configure_bank(1, 1, 2, RAM, 0x0000);
25   memory_configure_bank(1, 0, 2, RAM, 0xf800);
24     memory_configure_bank(machine, 1, 1, 2, RAM, 0x0000);
25   memory_configure_bank(machine, 1, 0, 2, RAM, 0xf800);
2626   mikro80_key_mask = 0x7f;
2727}
2828
r3592r3593
3535READ8_HANDLER (mikro80_8255_portb_r )
3636{
3737   UINT8 key = 0xff;
38   if ((mikro80_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); }
39   if ((mikro80_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); }
40   if ((mikro80_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); }
41   if ((mikro80_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); }
42   if ((mikro80_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); }
43   if ((mikro80_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); }
44   if ((mikro80_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); }
45   if ((mikro80_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); }
38   if ((mikro80_keyboard_mask & 0x01)!=0) { key &= input_port_read(space->machine,"LINE0"); }
39   if ((mikro80_keyboard_mask & 0x02)!=0) { key &= input_port_read(space->machine,"LINE1"); }
40   if ((mikro80_keyboard_mask & 0x04)!=0) { key &= input_port_read(space->machine,"LINE2"); }
41   if ((mikro80_keyboard_mask & 0x08)!=0) { key &= input_port_read(space->machine,"LINE3"); }
42   if ((mikro80_keyboard_mask & 0x10)!=0) { key &= input_port_read(space->machine,"LINE4"); }
43   if ((mikro80_keyboard_mask & 0x20)!=0) { key &= input_port_read(space->machine,"LINE5"); }
44   if ((mikro80_keyboard_mask & 0x40)!=0) { key &= input_port_read(space->machine,"LINE6"); }
45   if ((mikro80_keyboard_mask & 0x80)!=0) { key &= input_port_read(space->machine,"LINE7"); }
4646   return key & mikro80_key_mask;
4747}
4848
4949READ8_HANDLER (mikro80_8255_portc_r )
5050{
51   return input_port_read(machine, "LINE8");
51   return input_port_read(space->machine, "LINE8");
5252}
5353
5454WRITE8_HANDLER (mikro80_8255_porta_w )
r3592r3593
6060{
6161}
6262
63static READ8_DEVICE_HANDLER( mikro80_8255_portb_device_r ) { return mikro80_8255_portb_r(device->machine, offset); }
64static READ8_DEVICE_HANDLER( mikro80_8255_portc_device_r ) { return mikro80_8255_portc_r(device->machine, offset); }
65static WRITE8_DEVICE_HANDLER( mikro80_8255_porta_device_w ) { mikro80_8255_porta_w(device->machine, offset, data); }
63static READ8_DEVICE_HANDLER( mikro80_8255_portb_device_r ) { return mikro80_8255_portb_r(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), offset); }
64static READ8_DEVICE_HANDLER( mikro80_8255_portc_device_r ) { return mikro80_8255_portc_r(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), offset); }
65static WRITE8_DEVICE_HANDLER( mikro80_8255_porta_device_w ) { mikro80_8255_porta_w(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), offset, data); }
6666
6767const ppi8255_interface mikro80_ppi8255_interface =
6868{
r3592r3593
7777
7878static TIMER_CALLBACK( mikro80_reset )
7979{
80   memory_set_bank(1, 0);
80   memory_set_bank(machine,1, 0);
8181}
8282
8383MACHINE_RESET( mikro80 )
8484{
8585   timer_set(ATTOTIME_IN_USEC(10), NULL, 0, mikro80_reset);
86   memory_set_bank(1, 1);
86   memory_set_bank(machine, 1, 1);
8787   mikro80_keyboard_mask = 0;
8888}
8989
r3592r3593
101101
102102WRITE8_HANDLER( mikro80_tape_w )
103103{
104   cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ),data & 0x01 ? 1 : -1);
104   cassette_output(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" ),data & 0x01 ? 1 : -1);
105105}
106106
107107
108108READ8_HANDLER( mikro80_tape_r )
109109{
110   double level = cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ));
110   double level = cassette_input(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" ));
111111   if (level <  0) {
112112          return 0x00;
113113    }
src/mess/machine/ut88.c
r3592r3593
2222   /* set initialy ROM to be visible on first bank */
2323   UINT8 *RAM = memory_region(machine, "main");   
2424   memset(RAM,0x0000,0x0800); // make frist page empty by default
25     memory_configure_bank(1, 1, 2, RAM, 0x0000);
26   memory_configure_bank(1, 0, 2, RAM, 0xf800);
25     memory_configure_bank(machine, 1, 1, 2, RAM, 0x0000);
26   memory_configure_bank(machine, 1, 0, 2, RAM, 0xf800);
2727}
2828
2929static READ8_DEVICE_HANDLER (ut88_8255_portb_r )
r3592r3593
6262
6363static TIMER_CALLBACK( ut88_reset )
6464{
65   memory_set_bank(1, 0);
65   memory_set_bank(machine, 1, 0);
6666}
6767
6868MACHINE_RESET( ut88 )
6969{
7070   timer_set(ATTOTIME_IN_USEC(10), NULL, 0, ut88_reset);
71   memory_set_bank(1, 1);   
71   memory_set_bank(machine, 1, 1);   
7272   ut88_keyboard_mask = 0;
7373}
7474
r3592r3593
8787WRITE8_HANDLER( ut88_sound_w )
8888{
8989   dac_data_w(0,data); //beeper
90   cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ),data & 0x01 ? 1 : -1);   
90   cassette_output(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" ),data & 0x01 ? 1 : -1);   
9191}
9292
9393
9494READ8_HANDLER( ut88_tape_r )
9595{
96   double level = cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ));                                               
96   double level = cassette_input(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" ));                                               
9797   if (level <  0) {
9898          return 0x00;
9999    }
r3592r3593
103103READ8_HANDLER( ut88mini_keyboard_r )
104104{
105105   // This is real keyboard implementation
106   UINT8 *keyrom1 = memory_region(machine, "main")+ 0x10000;
107   UINT8 *keyrom2 = memory_region(machine, "main")+ 0x10100;
106   UINT8 *keyrom1 = memory_region(space->machine, "main")+ 0x10000;
107   UINT8 *keyrom2 = memory_region(space->machine, "main")+ 0x10100;
108108   
109   UINT8 key = keyrom2[input_port_read(machine, "LINE1")];
109   UINT8 key = keyrom2[input_port_read(space->machine, "LINE1")];
110110   // if keyboard 2nd part returned 0 on 4th bit output from
111111   // first part is used
112112   if ((key & 0x08) ==0x00) {     
113      key = keyrom1[input_port_read(machine, "LINE0")];   
113      key = keyrom1[input_port_read(space->machine, "LINE0")];   
114114   }   
115115   // for delete key there is special key producing code 0x80
116   key = (input_port_read(machine, "LINE2") & 0x80)==0x80 ? key : 0x80;   
116   key = (input_port_read(space->machine, "LINE2") & 0x80)==0x80 ? key : 0x80;   
117117   // If key 0 is pressed it value is 0x10 this is done by additional
118118   // discrete logic
119   key = (input_port_read(machine, "LINE0") & 0x01)==0x01 ? key : 0x10;
119   key = (input_port_read(space->machine, "LINE0") & 0x01)==0x01 ? key : 0x10;
120120   return key;
121121}
122122
src/mess/mess.mak
r3592r3593
377377   $(MESSOBJ)/homelab.a \
378378   $(MESSOBJ)/irisha.a \
379379   $(MESSOBJ)/kramermc.a \
380   $(MESSOBJ)/mikro80.a \
380381   $(MESSOBJ)/mk2.a \
381382   $(MESSOBJ)/ondra.a \
382383   $(MESSOBJ)/orion.a \
r3592r3593
388389   $(MESSOBJ)/sapi1.a \
389390   $(MESSOBJ)/sinclair.a \
390391   $(MESSOBJ)/special.a \
392   $(MESSOBJ)/ut88.a \
391393   $(MESSOBJ)/vector06.a \
392394   $(MESSOBJ)/votrax.a \
393395   $(MESSOBJ)/shared.a \
r3592r3593
442444#   $(MESSOBJ)/mc10.a \
443445#   $(MESSOBJ)/memotech.a \
444446#   $(MESSOBJ)/mephisto.a \
445#   $(MESSOBJ)/mikro80.a \
446447#   $(MESSOBJ)/mk1.a \
447448#   $(MESSOBJ)/motorola.a \
448449#   $(MESSOBJ)/multitch.a \
r3592r3593
482483#   $(MESSOBJ)/trs80.a \
483484#   $(MESSOBJ)/tutor.a \
484485#   $(MESSOBJ)/tx0.a \
485#   $(MESSOBJ)/ut88.a \
486486#   $(MESSOBJ)/vc4000.a \
487487#   $(MESSOBJ)/veb.a \
488488#   $(MESSOBJ)/vtech.a \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team