Previous 15994 Revisions Next

r9722 Saturday 4th December, 2010 at 19:33:54 UTC by Nathan Woods
More global removal. [Atari Ace]
[src/mess/drivers]pocketc.c
[src/mess/includes]pc1251.h pc1350.h pc1401.h pc1403.h pocketc.h
[src/mess/machine]pc1251.c pc1350.c pc1401.c pc1403.c
[src/mess/video]pc1251.c pc1350.c pc1401.c pc1403.c pocketc.c

src/mess/machine/pc1350.c
r9721r9722
55#include "includes/pc1350.h"
66#include "devices/messram.h"
77
8static UINT8 outa,outb;
98
10static int power; /* simulates pressed cce when mess is started */
119
1210void pc1350_outa(running_device *device, int data)
1311{
14   outa=data;
12   pc1350_state *state = device->machine->driver_data<pc1350_state>();
13   state->outa=data;
1514}
1615
1716void pc1350_outb(running_device *device, int data)
1817{
19   outb=data;
18   pc1350_state *state = device->machine->driver_data<pc1350_state>();
19   state->outb=data;
2020}
2121
2222void pc1350_outc(running_device *device, int data)
r9721r9722
2626
2727int pc1350_ina(running_device *device)
2828{
29   pc1350_state *state = device->machine->driver_data<pc1350_state>();
2930   running_machine *machine = device->machine;
30   int data = outa;
31   int t = pc1350_keyboard_line_r();
31   int data = state->outa;
32   int t = pc1350_keyboard_line_r(machine);
3233
3334   if (t & 0x01)
3435      data |= input_port_read(machine, "KEY0");
r9721r9722
4849   if (t & 0x20)
4950      data |= input_port_read(machine, "KEY5");
5051
51   if (outa & 0x01)
52   if (state->outa & 0x01)
5253      data |= input_port_read(machine, "KEY6");
5354
54   if (outa & 0x02)
55   if (state->outa & 0x02)
5556      data |= input_port_read(machine, "KEY7");
5657
57   if (outa & 0x04)
58   if (state->outa & 0x04)
5859   {
5960      data |= input_port_read(machine, "KEY8");
6061
6162      /* At Power Up we fake a 'CLS' pressure */
62      if (power)
63      if (state->power)
6364         data |= 0x08;
6465   }
6566
66   if (outa & 0x08)
67   if (state->outa & 0x08)
6768      data |= input_port_read(machine, "KEY9");
6869
69   if (outa & 0x10)
70   if (state->outa & 0x10)
7071      data |= input_port_read(machine, "KEY10");
7172
72   if (outa & 0xc0)
73   if (state->outa & 0xc0)
7374      data |= input_port_read(machine, "KEY11");
7475
7576   // missing lshift
r9721r9722
7980
8081int pc1350_inb(running_device *device)
8182{
82   int data=outb;
83   pc1350_state *state = device->machine->driver_data<pc1350_state>();
84   int data=state->outb;
8385   return data;
8486}
8587
r9721r9722
114116
115117static TIMER_CALLBACK(pc1350_power_up)
116118{
117   power=0;
119   pc1350_state *state = machine->driver_data<pc1350_state>();
120   state->power=0;
118121}
119122
120123MACHINE_START( pc1350 )
121124{
125   pc1350_state *state = machine->driver_data<pc1350_state>();
122126   address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
123127
124   power = 1;
128   state->power = 1;
125129   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1350_power_up);
126130
127131   memory_install_readwrite_bank(space, 0x6000, 0x6fff, 0, 0, "bank1");
src/mess/machine/pc1401.c
r9721r9722
19198 i/o device error
20209 other errors*/
2121
22static UINT8 outa,outb;
23UINT8 pc1401_portc;
2422
25static int power; /* simulates pressed cce when mess is started */
2623
2724void pc1401_outa(running_device *device, int data)
2825{
29   outa=data;
26   pc1401_state *state = device->machine->driver_data<pc1401_state>();
27   state->outa = data;
3028}
3129
3230void pc1401_outb(running_device *device, int data)
3331{
34   outb=data;
32   pc1401_state *state = device->machine->driver_data<pc1401_state>();
33   state->outb = data;
3534}
3635
3736void pc1401_outc(running_device *device, int data)
3837{
38   pc1401_state *state = device->machine->driver_data<pc1401_state>();
3939   //logerror("%g outc %.2x\n", attotime_to_double(timer_get_time(machine)), data);
40   pc1401_portc=data;
40   state->portc = data;
4141}
4242
4343int pc1401_ina(running_device *device)
4444{
45   int data = outa;
45   pc1401_state *state = device->machine->driver_data<pc1401_state>();
46   int data = state->outa;
4647
47   if (outb & 0x01)
48   if (state->outb & 0x01)
4849      data |= input_port_read(device->machine, "KEY0");
4950
50   if (outb & 0x02)
51   if (state->outb & 0x02)
5152      data |= input_port_read(device->machine, "KEY1");
5253
53   if (outb & 0x04)
54   if (state->outb & 0x04)
5455      data |= input_port_read(device->machine, "KEY2");
5556
56   if (outb & 0x08)
57   if (state->outb & 0x08)
5758      data |= input_port_read(device->machine, "KEY3");
5859
59   if (outb & 0x10)
60   if (state->outb & 0x10)
6061      data |= input_port_read(device->machine, "KEY4");
6162
62   if (outb & 0x20)
63   if (state->outb & 0x20)
6364   {
6465      data |= input_port_read(device->machine, "KEY5");
6566
6667      /* At Power Up we fake a 'C-CE' pressure */
67      if (power)
68      if (state->power)
6869         data |= 0x01;
6970   }
7071
71   if (outa & 0x01)
72   if (state->outa & 0x01)
7273      data |= input_port_read(device->machine, "KEY6");
7374
74   if (outa & 0x02)
75   if (state->outa & 0x02)
7576      data |= input_port_read(device->machine, "KEY7");
7677
77   if (outa & 0x04)
78   if (state->outa & 0x04)
7879      data |= input_port_read(device->machine, "KEY8");
7980
80   if (outa & 0x08)
81   if (state->outa & 0x08)
8182      data |= input_port_read(device->machine, "KEY9");
8283
83   if (outa & 0x10)
84   if (state->outa & 0x10)
8485      data |= input_port_read(device->machine, "KEY10");
8586
86   if (outa & 0x20)
87   if (state->outa & 0x20)
8788      data |= input_port_read(device->machine, "KEY11");
8889
89   if (outa & 0x40)
90   if (state->outa & 0x40)
9091      data |= input_port_read(device->machine, "KEY12");
9192
9293   return data;
r9721r9722
9495
9596int pc1401_inb(running_device *device)
9697{
97   int data=outb;
98   pc1401_state *state = device->machine->driver_data<pc1401_state>();
99   int data=state->outb;
98100
99101   if (input_port_read(device->machine, "EXTRA") & 0x04)
100102      data |= 0x01;
r9721r9722
138140
139141static TIMER_CALLBACK(pc1401_power_up)
140142{
141   power=0;
143   pc1401_state *state = machine->driver_data<pc1401_state>();
144   state->power = 0;
142145}
143146
144147DRIVER_INIT( pc1401 )
145148{
149   pc1401_state *state = machine->driver_data<pc1401_state>();
146150   int i;
147151   UINT8 *gfx=memory_region(machine, "gfx1");
148152#if 0
149   char sucker[]={
153   static const char sucker[]={
150154      /* this routine dump the memory (start 0)
151155           in an endless loop,
152156           the pc side must be started before this
r9721r9722
244248   for (i=0; i<128; i++)
245249      gfx[i]=i;
246250
247   power = 1;
251   state->power = 1;
248252   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1401_power_up);
249253}
src/mess/machine/pc1403.c
r9721r9722
22#include "cpu/sc61860/sc61860.h"
33
44#include "includes/pocketc.h"
5#include "includes/pc1401.h"
65#include "includes/pc1403.h"
76#include "devices/messram.h"
87
98/* C-CE while reset, program will not be destroyed! */
109
11static UINT8 outa;
12UINT8 pc1403_portc;
1310
14static int power; /* simulates pressed cce when mess is started */
1511
1612
1713/*
r9721r9722
2016   port 3:
2117     bits 0..6 keyboard output select matrix line
2218*/
23static UINT8 asic[4];
2419
2520WRITE8_HANDLER(pc1403_asic_write)
2621{
27    asic[offset>>9]=data;
22   pc1403_state *state = space->machine->driver_data<pc1403_state>();
23    state->asic[offset>>9]=data;
2824    switch( (offset>>9) ){
2925    case 0/*0x3800*/:
3026   // output
r9721r9722
4339
4440READ8_HANDLER(pc1403_asic_read)
4541{
46    UINT8 data=asic[offset>>9];
42   pc1403_state *state = space->machine->driver_data<pc1403_state>();
43    UINT8 data=state->asic[offset>>9];
4744    switch( (offset>>9) ){
4845    case 0: case 1: case 2:
4946   logerror ("asic read %.4x %.2x\n",offset, data);
r9721r9722
5451
5552void pc1403_outa(running_device *device, int data)
5653{
57    outa=data;
54   pc1403_state *state = device->machine->driver_data<pc1403_state>();
55    state->outa=data;
5856}
5957
6058int pc1403_ina(running_device *device)
6159{
62    UINT8 data=outa;
60   pc1403_state *state = device->machine->driver_data<pc1403_state>();
61    UINT8 data=state->outa;
6362
64    if (asic[3] & 0x01)
63    if (state->asic[3] & 0x01)
6564      data |= input_port_read(device->machine, "KEY0");
6665
67    if (asic[3] & 0x02)
66    if (state->asic[3] & 0x02)
6867      data |= input_port_read(device->machine, "KEY1");
6968
70    if (asic[3] & 0x04)
69    if (state->asic[3] & 0x04)
7170      data |= input_port_read(device->machine, "KEY2");
7271
73    if (asic[3] & 0x08)
72    if (state->asic[3] & 0x08)
7473      data |= input_port_read(device->machine, "KEY3");
7574
76    if (asic[3] & 0x10)
75    if (state->asic[3] & 0x10)
7776      data |= input_port_read(device->machine, "KEY4");
7877
79    if (asic[3] & 0x20)
78    if (state->asic[3] & 0x20)
8079      data |= input_port_read(device->machine, "KEY5");
8180
82    if (asic[3] & 0x40)
81    if (state->asic[3] & 0x40)
8382      data |= input_port_read(device->machine, "KEY6");
8483
85    if (outa & 0x01)
84    if (state->outa & 0x01)
8685   {
8786      data |= input_port_read(device->machine, "KEY7");
8887
8988      /* At Power Up we fake a 'C-CE' pressure */
90      if (power)
89      if (state->power)
9190         data |= 0x02;
9291   }
9392
94    if (outa & 0x02)
93    if (state->outa & 0x02)
9594      data |= input_port_read(device->machine, "KEY8");
9695
97    if (outa & 0x04)
96    if (state->outa & 0x04)
9897      data |= input_port_read(device->machine, "KEY9");
9998
100    if (outa & 0x08)
99    if (state->outa & 0x08)
101100      data |= input_port_read(device->machine, "KEY10");
102101
103    if (outa & 0x10)
102    if (state->outa & 0x10)
104103      data |= input_port_read(device->machine, "KEY11");
105104
106    if (outa & 0x20)
105    if (state->outa & 0x20)
107106      data |= input_port_read(device->machine, "KEY12");
108107
109    if (outa & 0x40)
108    if (state->outa & 0x40)
110109      data |= input_port_read(device->machine, "KEY13");
111110
112111    return data;
r9721r9722
115114#if 0
116115int pc1403_inb(void)
117116{
118   int data = outb;
117   pc1403_state *state = machine->driver_data<pc140_state>();
118   int data = state->outb;
119119
120120   if (input_port_read(machine, "KEY13"))
121121      data |= 1;
r9721r9722
126126
127127void pc1403_outc(running_device *device, int data)
128128{
129    pc1403_portc = data;
129   pc1403_state *state = device->machine->driver_data<pc1403_state>();
130    state->portc = data;
130131//    logerror("%g pc %.4x outc %.2x\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_pc(device->machine->device("maincpu")), data);
131132}
132133
r9721r9722
167168
168169static TIMER_CALLBACK(pc1403_power_up)
169170{
170   power=0;
171   pc1403_state *state = machine->driver_data<pc1403_state>();
172   state->power=0;
171173}
172174
173175DRIVER_INIT( pc1403 )
174176{
177   pc1403_state *state = machine->driver_data<pc1403_state>();
175178   int i;
176179   UINT8 *gfx=memory_region(machine, "gfx1");
177180
178181   for (i=0; i<128; i++) gfx[i]=i;
179182
180   power = 1;
183   state->power = 1;
181184   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1403_power_up);
182185
183186   memory_set_bankptr(machine, "bank1", memory_region(machine, "user1"));
src/mess/machine/pc1251.c
r9721r9722
66
77/* C-CE while reset, program will not be destroyed! */
88
9static UINT8 outa,outb;
109
11static int power; /* simulates pressed cce when mess is started */
1210
1311void pc1251_outa(running_device *device, int data)
1412{
15   outa=data;
13   pc1251_state *state = device->machine->driver_data<pc1251_state>();
14   state->outa = data;
1615}
1716
1817void pc1251_outb(running_device *device, int data)
1918{
20   outb=data;
19   pc1251_state *state = device->machine->driver_data<pc1251_state>();
20   state->outb = data;
2121}
2222
2323void pc1251_outc(running_device *device, int data)
2424{
25
2625}
2726
2827int pc1251_ina(running_device *device)
2928{
30   int data = outa;
29   pc1251_state *state = device->machine->driver_data<pc1251_state>();
30   int data = state->outa;
3131   running_machine *machine = device->machine;
3232
33   if (outb & 0x01)
33   if (state->outb & 0x01)
3434   {
3535      data |= input_port_read(machine, "KEY0");
3636
3737      /* At Power Up we fake a 'CL' pressure */
38      if (power)
38      if (state->power)
3939         data |= 0x02;      // problem with the deg lcd
4040   }
4141
42   if (outb & 0x02)
42   if (state->outb & 0x02)
4343      data |= input_port_read(machine, "KEY1");
4444
45   if (outb & 0x04)
45   if (state->outb & 0x04)
4646      data |= input_port_read(machine, "KEY2");
4747
48   if (outa & 0x01)
48   if (state->outa & 0x01)
4949      data |= input_port_read(machine, "KEY3");
5050
51   if (outa & 0x02)
51   if (state->outa & 0x02)
5252      data |= input_port_read(machine, "KEY4");
5353
54   if (outa & 0x04)
54   if (state->outa & 0x04)
5555      data |= input_port_read(machine, "KEY5");
5656
57   if (outa & 0x08)
57   if (state->outa & 0x08)
5858      data |= input_port_read(machine, "KEY6");
5959
60   if (outa & 0x10)
60   if (state->outa & 0x10)
6161      data |= input_port_read(machine, "KEY7");
6262
63   if (outa & 0x20)
63   if (state->outa & 0x20)
6464      data |= input_port_read(machine, "KEY8");
6565
66   if (outa & 0x40)
66   if (state->outa & 0x40)
6767      data |= input_port_read(machine, "KEY9");
6868
6969   return data;
r9721r9722
7171
7272int pc1251_inb(running_device *device)
7373{
74   int data = outb;
74   pc1251_state *state = device->machine->driver_data<pc1251_state>();
75   int data = state->outb;
7576
76   if (outb & 0x08)
77   if (state->outb & 0x08)
7778      data |= (input_port_read(device->machine, "MODE") & 0x07);
7879
7980   return data;
r9721r9722
115116
116117static TIMER_CALLBACK(pc1251_power_up)
117118{
118   power = 0;
119   pc1251_state *state = machine->driver_data<pc1251_state>();
120   state->power = 0;
119121}
120122
121123DRIVER_INIT( pc1251 )
122124{
125   pc1251_state *state = machine->driver_data<pc1251_state>();
123126   int i;
124127   UINT8 *gfx = memory_region(machine, "gfx1");
125128   for (i=0; i<128; i++) gfx[i]=i;
126129
127   power = 1;
130   state->power = 1;
128131   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1251_power_up);
129132}
130133
src/mess/video/pc1401.c
r9721r9722
1717  603d: 0 BUSY, 1 DEF, 2 SHIFT, 3 BGN, 4 STAT, 5 FIN, 6 PRINT
1818  607c: 0 E, 1 M, 2 BAL, 3 INT, 4 PRN, 5 Sum-Sign, 6 PRO */
1919
20static struct {
21   UINT8 reg[0x100];
22} pc1401_lcd;
23
2420 READ8_HANDLER(pc1401_lcd_read)
2521{
22   pc1401_state *state = space->machine->driver_data<pc1401_state>();
2623   offset&=0xff;
27   return pc1401_lcd.reg[offset];
24   return state->reg[offset];
2825}
2926
3027WRITE8_HANDLER(pc1401_lcd_write)
3128{
29   pc1401_state *state = space->machine->driver_data<pc1401_state>();
3230   offset&=0xff;
33   pc1401_lcd.reg[offset]=data;
31   state->reg[offset]=data;
3432}
3533
3634static const POCKETC_FIGURE   line={ /* simple line */
r9721r9722
135133
136134VIDEO_UPDATE( pc1401 )
137135{
136   pc1401_state *state = screen->machine->driver_data<pc1401_state>();
138137   running_machine *machine = screen->machine;
139138   int x, y, i, j;
140139   int color[2];
r9721r9722
150149   color[0] = 7;
151150   color[1] = 8;
152151
153   if (pc1401_portc&1)
152   if (state->portc&1)
154153   {
155154      for (x=RIGHT,y=DOWN,i=0; i<0x28;x+=2)
156155      {
157156         for (j=0; j<5;j++,i++,x+=2)
158         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1401_lcd.reg[i],CONTRAST,0,0,x,y);
157         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],CONTRAST,0,0,x,y);
159158      }
160159      for (i=0x67; i>=0x40;x+=2)
161160      {
162161         for (j=0; j<5;j++,i--,x+=2)
163         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1401_lcd.reg[i],CONTRAST,0,0,x,y);
162         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],CONTRAST,0,0,x,y);
164163      }
165164   }
166165
167166   pocketc_draw_special(bitmap, RIGHT+149, DOWN+24, line,
168         pc1401_lcd.reg[0x3c] & 0x08 ? color[1] : color[0]);
167         state->reg[0x3c] & 0x08 ? color[1] : color[0]);
169168
170169   pocketc_draw_special(bitmap, RIGHT, DOWN-10, busy,
171         pc1401_lcd.reg[0x3d] & 0x01 ? color[1] : color[0]);
170         state->reg[0x3d] & 0x01 ? color[1] : color[0]);
172171
173172   pocketc_draw_special(bitmap, RIGHT+18, DOWN-10, def,
174         pc1401_lcd.reg[0x3d] & 0x02 ? color[1] : color[0]);
173         state->reg[0x3d] & 0x02 ? color[1] : color[0]);
175174
176175   pocketc_draw_special(bitmap, RIGHT+43, DOWN-10,shift,
177         pc1401_lcd.reg[0x3d] & 0x04 ? color[1] : color[0]);
176         state->reg[0x3d] & 0x04 ? color[1] : color[0]);
178177
179178   pocketc_draw_special(bitmap, RIGHT+63, DOWN-10,hyp,
180         pc1401_lcd.reg[0x3d] & 0x08 ? color[1] : color[0]);
179         state->reg[0x3d] & 0x08 ? color[1] : color[0]);
181180
182181   pocketc_draw_special(bitmap, RIGHT+38, DOWN+24,line,
183         pc1401_lcd.reg[0x3d] & 0x10 ? color[1] : color[0]);
182         state->reg[0x3d] & 0x10 ? color[1] : color[0]);
184183
185184   pocketc_draw_special(bitmap, RIGHT+23, DOWN+24,line,
186         pc1401_lcd.reg[0x3d] & 0x20 ? color[1] : color[0]);
185         state->reg[0x3d] & 0x20 ? color[1] : color[0]);
187186
188187   pocketc_draw_special(bitmap, RIGHT+8, DOWN+24,line,
189         pc1401_lcd.reg[0x3d] & 0x40 ? color[1] : color[0]);
188         state->reg[0x3d] & 0x40 ? color[1] : color[0]);
190189
191190   pocketc_draw_special(bitmap, RIGHT+183, DOWN-10,e,
192         pc1401_lcd.reg[0x7c] & 0x01 ? color[1] : color[0]);
191         state->reg[0x7c] & 0x01 ? color[1] : color[0]);
193192
194193   pocketc_draw_special(bitmap, RIGHT+176, DOWN-10,m,
195         pc1401_lcd.reg[0x7c] & 0x02 ? color[1] : color[0]);
194         state->reg[0x7c] & 0x02 ? color[1] : color[0]);
196195
197196   pocketc_draw_special(bitmap, RIGHT+168, DOWN-10,braces,
198         pc1401_lcd.reg[0x7c] & 0x04 ? color[1] : color[0]);
197         state->reg[0x7c] & 0x04 ? color[1] : color[0]);
199198
200199   pocketc_draw_special(bitmap, RIGHT+138, DOWN-10,rad,
201         pc1401_lcd.reg[0x7c] & 0x08 ? color[1] : color[0]);
200         state->reg[0x7c] & 0x08 ? color[1] : color[0]);
202201
203202   pocketc_draw_special(bitmap, RIGHT+134, DOWN-10,g,
204         pc1401_lcd.reg[0x7c] & 0x10 ? color[1] : color[0]);
203         state->reg[0x7c] & 0x10 ? color[1] : color[0]);
205204
206205   pocketc_draw_special(bitmap, RIGHT+126, DOWN-10,de,
207         pc1401_lcd.reg[0x7c] & 0x20 ? color[1] : color[0]);
206         state->reg[0x7c] & 0x20 ? color[1] : color[0]);
208207
209208   pocketc_draw_special(bitmap, RIGHT+165, DOWN+24,line,
210         pc1401_lcd.reg[0x7c] & 0x40 ? color[1] : color[0]);
209         state->reg[0x7c] & 0x40 ? color[1] : color[0]);
211210
212211/*
213212  603c: 3 STAT
src/mess/video/pc1350.c
r9721r9722
9595   "1 1 11    1e"
9696};
9797
98static struct {
99   UINT8 reg[0x1000];
100} pc1350_lcd;
101
10298 READ8_HANDLER(pc1350_lcd_read)
10399{
100   pc1350_state *state = space->machine->driver_data<pc1350_state>();
104101   int data;
105   data=pc1350_lcd.reg[offset&0xfff];
102   data = state->reg[offset&0xfff];
106103   logerror("pc1350 read %.3x %.2x\n",offset,data);
107104   return data;
108105}
109106
110107WRITE8_HANDLER(pc1350_lcd_write)
111108{
109   pc1350_state *state = space->machine->driver_data<pc1350_state>();
112110   logerror("pc1350 write %.3x %.2x\n",offset,data);
113   pc1350_lcd.reg[offset&0xfff]=data;
111   state->reg[offset&0xfff] = data;
114112}
115113
116int pc1350_keyboard_line_r(void)
114int pc1350_keyboard_line_r(running_machine *machine)
117115{
118   return pc1350_lcd.reg[0xe00];
116   pc1350_state *state = machine->driver_data<pc1350_state>();
117   return state->reg[0xe00];
119118}
120119
121120/* pc1350
r9721r9722
131130#define RIGHT 76
132131
133132VIDEO_UPDATE( pc1350 )
134{   /* The contrast colours need some work done - select contrast level 7 for now */
133{
134   pc1350_state *state = screen->machine->driver_data<pc1350_state>();   /* The contrast colours need some work done - select contrast level 7 for now */
135135   int x, y=DOWN, i, j, k=0, b;
136136   int color[4];
137137   running_machine *machine = screen->machine;
r9721r9722
148148      for (x=RIGHT, i=pc1350_addr[k]; i<0xa00; i+=0x200)
149149         for (j=0; j<=0x1d; j++, x+=2)
150150            for (b = 0; b < 8; b++)
151               plot_box(bitmap, x, y + b * 2, 2, 2, color[(pc1350_lcd.reg[j+i] >> b) & 1]);
151               plot_box(bitmap, x, y + b * 2, 2, 2, color[(state->reg[j+i] >> b) & 1]);
152152
153153
154154   /* 783c: 0 SHIFT 1 DEF 4 RUN 5 PRO 6 JAPAN 7 SML */
155155   /* I don't know how they really look like in the lcd */
156156   pocketc_draw_special(bitmap, RIGHT-30, DOWN+45, shift,
157                  pc1350_lcd.reg[0x83c] & 0x01 ? color[2] : color[3]);
157                  state->reg[0x83c] & 0x01 ? color[2] : color[3]);
158158   pocketc_draw_special(bitmap, RIGHT-30, DOWN+55, def,
159                  pc1350_lcd.reg[0x83c] & 0x02 ? color[2] : color[3]);
159                  state->reg[0x83c] & 0x02 ? color[2] : color[3]);
160160   pocketc_draw_special(bitmap, RIGHT-30, DOWN+5, run,
161                  pc1350_lcd.reg[0x83c] & 0x10 ? color[2] : color[3]);
161                  state->reg[0x83c] & 0x10 ? color[2] : color[3]);
162162   pocketc_draw_special(bitmap, RIGHT-30, DOWN+15, pro,
163                  pc1350_lcd.reg[0x83c] & 0x20 ? color[2] : color[3]);
163                  state->reg[0x83c] & 0x20 ? color[2] : color[3]);
164164   pocketc_draw_special(bitmap, RIGHT-30, DOWN+25, japan,
165                  pc1350_lcd.reg[0x83c] & 0x40 ? color[2] : color[3]);
165                  state->reg[0x83c] & 0x40 ? color[2] : color[3]);
166166   pocketc_draw_special(bitmap, RIGHT-30, DOWN+35, sml,
167                  pc1350_lcd.reg[0x83c] & 0x80 ? color[2] : color[3]);
167                  state->reg[0x83c] & 0x80 ? color[2] : color[3]);
168168
169169   return 0;
170170}
src/mess/video/pocketc.c
r9721r9722
4949}
5050
5151
52VIDEO_START( pocketc )
53{
54   pocketc_state *state = machine->driver_data<pocketc_state>();
55   state->videoram = auto_alloc_array(machine, UINT8, 6 * 2 + 24);
56}
57
5852/* Draw an indicator (DEG, SHIFT, etc) */
5953void pocketc_draw_special(bitmap_t *bitmap, int x, int y, const POCKETC_FIGURE fig, int color)
6054{
src/mess/video/pc1403.c
r9721r9722
3333#include "includes/pocketc.h"
3434#include "includes/pc1403.h"
3535
36static struct {
37   UINT8 reg[0x100];
38} pc1403_lcd;
3936
40static int DOWN, RIGHT;
41
4237VIDEO_START( pc1403 )
4338{
39   pc1403_state *state = machine->driver_data<pc1403_state>();
4440   if (strcmp(machine->gamedrv->name, "pc1403h") == 0)
4541   {
46      DOWN = 69;
47      RIGHT = 155;
42      state->DOWN = 69;
43      state->RIGHT = 155;
4844   }
4945   else
5046   {
51      DOWN = 67;
52      RIGHT = 152;
47      state->DOWN = 67;
48      state->RIGHT = 152;
5349   }
54
55    VIDEO_START_CALL(pocketc);
5650}
5751
5852
5953READ8_HANDLER(pc1403_lcd_read)
6054{
61    UINT8 data=pc1403_lcd.reg[offset];
62    return data;
55   pc1403_state *state = space->machine->driver_data<pc1403_state>();
56   return state->reg[offset];
6357}
6458
6559WRITE8_HANDLER(pc1403_lcd_write)
6660{
67    pc1403_lcd.reg[offset]=data;
61   pc1403_state *state = space->machine->driver_data<pc1403_state>();
62   state->reg[offset]=data;
6863}
6964
7065static const POCKETC_FIGURE   line={ /* simple line */
r9721r9722
154149
155150VIDEO_UPDATE( pc1403 )
156151{
152   pc1403_state *state = screen->machine->driver_data<pc1403_state>();
157153   running_machine *machine = screen->machine;
158154   int x, y, i, j;
159155   int color[3];
r9721r9722
163159   /* HJB: we cannot initialize array with values from other arrays, thus... */
164160   color[0] = 7; // pocketc_colortable[CONTRAST][0];
165161   color[2] = 8; // pocketc_colortable[CONTRAST][1];
166   color[1] = (pc1403_portc & 1) ? color[2] : color[0];
162   color[1] = (state->portc & 1) ? color[2] : color[0];
167163
168   if (pc1403_portc & 1)
164   if (state->portc & 1)
169165   {
170      for (x=RIGHT, y=DOWN, i=0; i<6*5; x+=2) {
166      for (x=state->RIGHT, y=state->DOWN, i=0; i<6*5; x+=2) {
171167         for (j=0; j<5; j++, i++, x+=2)
172         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0,
168         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],CONTRAST,0,0,
173169            x,y);
174170      }
175171      for (i=9*5; i<12*5; x+=2)
176172      {
177173         for (j=0; j<5; j++, i++, x+=2)
178         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0,
174         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],CONTRAST,0,0,
179175            x,y);
180176      }
181177      for (i=6*5; i<9*5; x+=2)
182178      {
183179         for (j=0; j<5; j++, i++, x+=2)
184         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0,
180         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],CONTRAST,0,0,
185181            x,y);
186182      }
187183      for (i=0x7b-3*5; i>0x7b-6*5; x+=2)
188184      {
189185         for (j=0; j<5; j++, i--, x+=2)
190            drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0,
186            drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],CONTRAST,0,0,
191187            x,y);
192188      }
193189      for (i=0x7b; i>0x7b-3*5; x+=2)
194190      {
195191         for (j=0; j<5; j++, i--, x+=2)
196         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0,
192         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],CONTRAST,0,0,
197193            x,y);
198194      }
199195      for (i=0x7b-6*5; i>0x7b-12*5; x+=2)
200196      {
201197         for (j=0; j<5; j++, i--, x+=2)
202         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0,
198         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],CONTRAST,0,0,
203199            x,y);
204200      }
205201   }
206    /* if display is off, busy is always visible? it seems to behave like that. */
207    /* But if computer is off, busy is hidden. */
208    if(!(pc1403_portc&8))
209    {
210      if (pc1403_portc&1)
211         pocketc_draw_special(bitmap, RIGHT, DOWN-13, busy,
212            pc1403_lcd.reg[0x3d] & 1 ? color[2] : color[0]);
202   /* if display is off, busy is always visible? it seems to behave like that. */
203   /* But if computer is off, busy is hidden. */
204   if(!(state->portc&8))
205   {
206      if (state->portc&1)
207         pocketc_draw_special(bitmap, state->RIGHT, state->DOWN-13, busy,
208            state->reg[0x3d] & 1 ? color[2] : color[0]);
213209
214      else pocketc_draw_special(bitmap, RIGHT, DOWN-13, busy, color[2]);
215    }
216    else pocketc_draw_special(bitmap, RIGHT, DOWN-13, busy, color[0]);
210      else pocketc_draw_special(bitmap, state->RIGHT, state->DOWN-13, busy, color[2]);
211   }
212   else
213      pocketc_draw_special(bitmap, state->RIGHT, state->DOWN-13, busy, color[0]);
217214
218   pocketc_draw_special(bitmap, RIGHT+18, DOWN-13, def,
219          pc1403_lcd.reg[0x3d] & 0x02 ? color[1] : color[0]);
220   pocketc_draw_special(bitmap, RIGHT+43, DOWN-13, shift,
221          pc1403_lcd.reg[0x3d] & 0x04 ? color[1] : color[0]);
222   pocketc_draw_special(bitmap, RIGHT+63, DOWN-13, hyp,
223          pc1403_lcd.reg[0x3d] & 0x08 ? color[1] : color[0]);
215   pocketc_draw_special(bitmap, state->RIGHT+18, state->DOWN-13, def,
216          state->reg[0x3d] & 0x02 ? color[1] : color[0]);
217   pocketc_draw_special(bitmap, state->RIGHT+43, state->DOWN-13, shift,
218          state->reg[0x3d] & 0x04 ? color[1] : color[0]);
219   pocketc_draw_special(bitmap, state->RIGHT+63, state->DOWN-13, hyp,
220          state->reg[0x3d] & 0x08 ? color[1] : color[0]);
224221
225   pocketc_draw_special(bitmap, RIGHT+155, DOWN-13, kana,
226          pc1403_lcd.reg[0x3c] & 0x01 ? color[1] : color[0]);
227   pocketc_draw_special(bitmap, RIGHT+167, DOWN-13, shoo,
228          pc1403_lcd.reg[0x3c] & 0x02 ? color[1] : color[0]);
229   pocketc_draw_special(bitmap, RIGHT+178, DOWN-13, sml,
230          pc1403_lcd.reg[0x3c] & 0x04 ? color[1] : color[0]);
222   pocketc_draw_special(bitmap, state->RIGHT+155, state->DOWN-13, kana,
223          state->reg[0x3c] & 0x01 ? color[1] : color[0]);
224   pocketc_draw_special(bitmap, state->RIGHT+167, state->DOWN-13, shoo,
225          state->reg[0x3c] & 0x02 ? color[1] : color[0]);
226   pocketc_draw_special(bitmap, state->RIGHT+178, state->DOWN-13, sml,
227          state->reg[0x3c] & 0x04 ? color[1] : color[0]);
231228
232   pocketc_draw_special(bitmap, RIGHT+191, DOWN-13, de,
233          pc1403_lcd.reg[0x7c] & 0x20 ? color[1] : color[0]);
234   pocketc_draw_special(bitmap, RIGHT+199, DOWN-13, g,
235          pc1403_lcd.reg[0x7c] & 0x10 ? color[1] : color[0]);
236   pocketc_draw_special(bitmap, RIGHT+203, DOWN-13, rad,
237          pc1403_lcd.reg[0x7c] & 0x08 ? color[1] : color[0]);
229   pocketc_draw_special(bitmap, state->RIGHT+191, state->DOWN-13, de,
230          state->reg[0x7c] & 0x20 ? color[1] : color[0]);
231   pocketc_draw_special(bitmap, state->RIGHT+199, state->DOWN-13, g,
232          state->reg[0x7c] & 0x10 ? color[1] : color[0]);
233   pocketc_draw_special(bitmap, state->RIGHT+203, state->DOWN-13, rad,
234          state->reg[0x7c] & 0x08 ? color[1] : color[0]);
238235
239   pocketc_draw_special(bitmap, RIGHT+266, DOWN-13, braces,
240          pc1403_lcd.reg[0x7c] & 0x04 ? color[1] : color[0]);
241   pocketc_draw_special(bitmap, RIGHT+274, DOWN-13, m,
242          pc1403_lcd.reg[0x7c] & 0x02 ? color[1] : color[0]);
243   pocketc_draw_special(bitmap, RIGHT+281, DOWN-13, e,
244          pc1403_lcd.reg[0x7c] & 0x01 ? color[1] : color[0]);
236   pocketc_draw_special(bitmap, state->RIGHT+266, state->DOWN-13, braces,
237          state->reg[0x7c] & 0x04 ? color[1] : color[0]);
238   pocketc_draw_special(bitmap, state->RIGHT+274, state->DOWN-13, m,
239          state->reg[0x7c] & 0x02 ? color[1] : color[0]);
240   pocketc_draw_special(bitmap, state->RIGHT+281, state->DOWN-13, e,
241          state->reg[0x7c] & 0x01 ? color[1] : color[0]);
245242
246   pocketc_draw_special(bitmap, RIGHT+10, DOWN+27, line /* empty */,
247          pc1403_lcd.reg[0x3c] & 0x40 ? color[1] : color[0]);
248   pocketc_draw_special(bitmap, RIGHT+31, DOWN+27, line /*calc*/,
249          pc1403_lcd.reg[0x3d] & 0x40 ? color[1] : color[0]);
250   pocketc_draw_special(bitmap, RIGHT+52, DOWN+27, line/*run*/,
251          pc1403_lcd.reg[0x3d] & 0x20 ? color[1] : color[0]);
252   pocketc_draw_special(bitmap, RIGHT+73, DOWN+27, line/*prog*/,
253          pc1403_lcd.reg[0x3d] & 0x10 ? color[1] : color[0]);
254   pocketc_draw_special(bitmap, RIGHT+94, DOWN+27, line /* empty */,
255          pc1403_lcd.reg[0x3c] & 0x20 ? color[1] : color[0]);
243   pocketc_draw_special(bitmap, state->RIGHT+10, state->DOWN+27, line /* empty */,
244          state->reg[0x3c] & 0x40 ? color[1] : color[0]);
245   pocketc_draw_special(bitmap, state->RIGHT+31, state->DOWN+27, line /*calc*/,
246          state->reg[0x3d] & 0x40 ? color[1] : color[0]);
247   pocketc_draw_special(bitmap, state->RIGHT+52, state->DOWN+27, line/*run*/,
248          state->reg[0x3d] & 0x20 ? color[1] : color[0]);
249   pocketc_draw_special(bitmap, state->RIGHT+73, state->DOWN+27, line/*prog*/,
250          state->reg[0x3d] & 0x10 ? color[1] : color[0]);
251   pocketc_draw_special(bitmap, state->RIGHT+94, state->DOWN+27, line /* empty */,
252          state->reg[0x3c] & 0x20 ? color[1] : color[0]);
256253
257   pocketc_draw_special(bitmap, RIGHT+232, DOWN+27, line/*matrix*/,
258          pc1403_lcd.reg[0x3c] & 0x10 ? color[1] : color[0]);
259   pocketc_draw_special(bitmap, RIGHT+253, DOWN+27, line/*stat*/,
260          pc1403_lcd.reg[0x3c] & 0x08 ? color[1] : color[0]);
261   pocketc_draw_special(bitmap, RIGHT+274, DOWN+27, line/*print*/,
262          pc1403_lcd.reg[0x7c] & 0x40 ? color[1] : color[0]);
254   pocketc_draw_special(bitmap, state->RIGHT+232, state->DOWN+27, line/*matrix*/,
255          state->reg[0x3c] & 0x10 ? color[1] : color[0]);
256   pocketc_draw_special(bitmap, state->RIGHT+253, state->DOWN+27, line/*stat*/,
257          state->reg[0x3c] & 0x08 ? color[1] : color[0]);
258   pocketc_draw_special(bitmap, state->RIGHT+274, state->DOWN+27, line/*print*/,
259          state->reg[0x7c] & 0x40 ? color[1] : color[0]);
263260
264261   return 0;
265262}
src/mess/video/pc1251.c
r9721r9722
9595   "1 1 11    1e"
9696};
9797
98static struct {
99   UINT8 reg[0x100];
100} pc1251_lcd;
101
10298 READ8_HANDLER(pc1251_lcd_read)
10399{
100   pc1251_state *state = space->machine->driver_data<pc1251_state>();
104101   int data;
105   data=pc1251_lcd.reg[offset&0xff];
102   data = state->reg[offset&0xff];
106103   logerror("pc1251 read %.3x %.2x\n",offset,data);
107104   return data;
108105}
109106
110107WRITE8_HANDLER(pc1251_lcd_write)
111108{
109   pc1251_state *state = space->machine->driver_data<pc1251_state>();
112110   logerror("pc1251 write %.3x %.2x\n",offset,data);
113   pc1251_lcd.reg[offset&0xff]=data;
111   state->reg[offset&0xff] = data;
114112}
115113
116114#define DOWN 62
r9721r9722
118116
119117VIDEO_UPDATE( pc1251 )
120118{
119   pc1251_state *state = screen->machine->driver_data<pc1251_state>();
121120   int x, y, i, j;
122121   int color[2];
123122   running_machine *machine = screen->machine;
r9721r9722
131130   for (x=RIGHT,y=DOWN, i=0; i<60; x+=3)
132131   {
133132      for (j=0; j<5; j++, i++, x+=3)
134         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1251_lcd.reg[i],
133         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],
135134               PC1251_CONTRAST,0,0,
136135               x,y);
137136   }
138137   for (i=0x7b; i>=0x40; x+=3)
139138   {
140139      for (j=0; j<5; j++, i--, x+=3)
141         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], pc1251_lcd.reg[i],
140         drawgfx_opaque(bitmap, 0, screen->machine->gfx[0], state->reg[i],
142141               PC1251_CONTRAST,0,0,
143142               x,y);
144143   }
145144
146145   pocketc_draw_special(bitmap, RIGHT+134, DOWN-10, de,
147                  pc1251_lcd.reg[0x3c] & 0x08 ? color[1] : color[0]);
146                  state->reg[0x3c] & 0x08 ? color[1] : color[0]);
148147   pocketc_draw_special(bitmap, RIGHT+142, DOWN-10, g,
149                  pc1251_lcd.reg[0x3c] & 0x04 ? color[1] : color[0]);
148                  state->reg[0x3c] & 0x04 ? color[1] : color[0]);
150149   pocketc_draw_special(bitmap, RIGHT+146, DOWN-10, rad,
151                  pc1251_lcd.reg[0x3d] & 0x04 ? color[1] : color[0]);
150                  state->reg[0x3d] & 0x04 ? color[1] : color[0]);
152151   pocketc_draw_special(bitmap, RIGHT+18, DOWN-10, def,
153                  pc1251_lcd.reg[0x3c] & 0x01 ? color[1] : color[0]);
152                  state->reg[0x3c] & 0x01 ? color[1] : color[0]);
154153   pocketc_draw_special(bitmap, RIGHT, DOWN-10, shift,
155                  pc1251_lcd.reg[0x3d] & 0x02 ? color[1] : color[0]);
154                  state->reg[0x3d] & 0x02 ? color[1] : color[0]);
156155   pocketc_draw_special(bitmap, RIGHT+38, DOWN-10, pro,
157                  pc1251_lcd.reg[0x3e] & 0x01 ? color[1] : color[0]);
156                  state->reg[0x3e] & 0x01 ? color[1] : color[0]);
158157   pocketc_draw_special(bitmap, RIGHT+53, DOWN-10, run,
159                  pc1251_lcd.reg[0x3e] & 0x02 ? color[1] : color[0]);
158                  state->reg[0x3e] & 0x02 ? color[1] : color[0]);
160159   pocketc_draw_special(bitmap, RIGHT+68, DOWN-10, rsv,
161                  pc1251_lcd.reg[0x3e] & 0x04 ? color[1] : color[0]);
160                  state->reg[0x3e] & 0x04 ? color[1] : color[0]);
162161
163162   /* 0x3c 1 def?, 4 g, 8 de
164163       0x3d 2 shift, 4 rad, 8 error
src/mess/includes/pc1401.h
r9721r9722
1212#define CONTRAST (input_port_read(machine, "DSW0") & 0x07)
1313
1414
15class pc1401_state : public driver_device
16{
17public:
18   pc1401_state(running_machine &machine, const driver_device_config_base &config)
19      : driver_device(machine, config) { }
20
21   UINT8 portc;
22   UINT8 outa;
23   UINT8 outb;
24   int power;
25   UINT8 reg[0x100];
26};
27
28
1529/*----------- defined in machine/pc1401.c -----------*/
1630
17extern UINT8 pc1401_portc;
1831int pc1401_reset(running_device *device);
1932int pc1401_brk(running_device *device);
2033void pc1401_outa(running_device *device, int data);
src/mess/includes/pc1350.h
r9721r9722
1212#define PC1350_CONTRAST (input_port_read(machine, "DSW0") & 0x07)
1313
1414
15class pc1350_state : public driver_device
16{
17public:
18   pc1350_state(running_machine &machine, const driver_device_config_base &config)
19      : driver_device(machine, config) { }
20
21   UINT8 outa;
22   UINT8 outb;
23   int power;
24   UINT8 reg[0x1000];
25};
26
27
1528/*----------- defined in machine/pc1350.c -----------*/
1629
1730void pc1350_outa(running_device *device, int data);
r9721r9722
3245WRITE8_HANDLER(pc1350_lcd_write);
3346VIDEO_UPDATE( pc1350 );
3447
35int pc1350_keyboard_line_r(void);
48int pc1350_keyboard_line_r(running_machine *machine);
3649
3750
3851#endif /* PC1350_H_ */
src/mess/includes/pocketc.h
r9721r9722
88#define POCKETC_H_
99
1010
11class pocketc_state : public driver_device
12{
13public:
14   pocketc_state(running_machine &machine, const driver_device_config_base &config)
15      : driver_device(machine, config) { }
16
17   UINT8 *videoram;
18};
19
20
2111/*----------- defined in video/pocketc.c -----------*/
2212
2313extern PALETTE_INIT( pocketc );
src/mess/includes/pc1403.h
r9721r9722
1212#define CONTRAST (input_port_read(machine, "DSW0") & 0x07)
1313
1414
15class pc1403_state : public driver_device
16{
17public:
18   pc1403_state(running_machine &machine, const driver_device_config_base &config)
19      : driver_device(machine, config) { }
20
21   UINT8 portc;
22   UINT8 outa;
23   int power;
24   UINT8 asic[4];
25   int DOWN;
26   int RIGHT;
27   UINT8 reg[0x100];
28};
29
30
1531/*----------- defined in machine/pc1403.c -----------*/
1632
17extern UINT8 pc1403_portc;
18
1933int pc1403_reset(running_device *device);
2034int pc1403_brk(running_device *device);
2135void pc1403_outa(running_device *device, int data);
src/mess/includes/pc1251.h
r9721r9722
1313#define PC1251_CONTRAST (input_port_read(machine, "DSW0") & 0x07)
1414
1515
16class pc1251_state : public driver_device
17{
18public:
19   pc1251_state(running_machine &machine, const driver_device_config_base &config)
20      : driver_device(machine, config) { }
21
22   UINT8 outa;
23   UINT8 outb;
24   int power;
25   UINT8 reg[0x100];
26};
27
28
1629/*----------- defined in machine/pc1251.c -----------*/
1730
1831void pc1251_outa(running_device *device, int data);
src/mess/drivers/pocketc.c
r9721r9722
715715   pc1401_outc
716716};
717717
718static MACHINE_CONFIG_START( pc1401, pocketc_state )
719   /* basic machine hardware */
720   MDRV_CPU_ADD("maincpu", SC61860, 192000)        /* 7.8336 MHz */
721   MDRV_CPU_PROGRAM_MAP(pc1401_mem)
722   MDRV_CPU_CONFIG(pc1401_config)
723
718static MACHINE_CONFIG_FRAGMENT( pocketc )
724719   MDRV_QUANTUM_TIME(HZ(60))
725720
726721   MDRV_NVRAM_HANDLER( pc1401 )
r9721r9722
743738   MDRV_PALETTE_LENGTH(8*2)
744739   MDRV_PALETTE_INIT( pocketc )
745740
746   MDRV_VIDEO_START( pocketc )
747   MDRV_VIDEO_UPDATE( pc1401 )
748
749741   /* sound hardware */
750742   /*MDRV_SOUND_ADD("dac", DAC, pocketc_sound_interface)*/
751743MACHINE_CONFIG_END
752744
745static MACHINE_CONFIG_START( pc1401, pc1401_state )
746   MDRV_CPU_ADD("maincpu", SC61860, 192000)        /* 7.8336 MHz */
747   MDRV_CPU_PROGRAM_MAP(pc1401_mem)
748   MDRV_CPU_CONFIG(pc1401_config)
749
750   MDRV_FRAGMENT_ADD(pocketc)
751
752   MDRV_VIDEO_UPDATE( pc1401 )
753
754MACHINE_CONFIG_END
755
753756static MACHINE_CONFIG_DERIVED( pc1402, pc1401 )
754757   MDRV_CPU_MODIFY( "maincpu" )
755758   MDRV_CPU_PROGRAM_MAP( pc1402_mem)
r9721r9722
757760
758761static const sc61860_cpu_core pc1251_config =
759762{
760    NULL, pc1251_brk, NULL,
761    pc1251_ina, pc1251_outa,
762    pc1251_inb, pc1251_outb,
763    pc1251_outc
763   NULL, pc1251_brk, NULL,
764   pc1251_ina, pc1251_outa,
765   pc1251_inb, pc1251_outb,
766   pc1251_outc
764767};
765768
766static MACHINE_CONFIG_DERIVED( pc1250, pc1401 )
767   MDRV_CPU_MODIFY( "maincpu" )
769static MACHINE_CONFIG_START( pc1250, pc1251_state )
770   MDRV_CPU_ADD("maincpu", SC61860, 192000)        /* 7.8336 MHz */
768771   MDRV_CPU_PROGRAM_MAP( pc1250_mem)
769772   MDRV_CPU_CONFIG( pc1251_config )
770773
774   MDRV_FRAGMENT_ADD(pocketc)
775
771776   MDRV_NVRAM_HANDLER( pc1251 )
772777
773778   /* video hardware */
r9721r9722
826831
827832static const sc61860_cpu_core pc1350_config =
828833{
829    NULL, pc1350_brk,NULL,
830    pc1350_ina, pc1350_outa,
831    pc1350_inb, pc1350_outb,
832    pc1350_outc
834   NULL, pc1350_brk,NULL,
835   pc1350_ina, pc1350_outa,
836   pc1350_inb, pc1350_outb,
837   pc1350_outc
833838};
834839
835static MACHINE_CONFIG_DERIVED( pc1350, pc1401 )
836   MDRV_CPU_MODIFY( "maincpu" )
840static MACHINE_CONFIG_START( pc1350, pc1350_state )
841   MDRV_CPU_ADD("maincpu", SC61860, 192000)        /* 7.8336 MHz */
837842   MDRV_CPU_PROGRAM_MAP( pc1350_mem)
838843   MDRV_CPU_CONFIG( pc1350_config )
839844
845   MDRV_FRAGMENT_ADD( pocketc )
846
840847   MDRV_MACHINE_START( pc1350 )
841848   MDRV_NVRAM_HANDLER( pc1350 )
842849
r9721r9722
859866
860867static const sc61860_cpu_core pc1403_config =
861868{
862    NULL, pc1403_brk, NULL,
863    pc1403_ina, pc1403_outa,
864    NULL,NULL,
865    pc1403_outc
869   NULL, pc1403_brk, NULL,
870   pc1403_ina, pc1403_outa,
871   NULL,NULL,
872   pc1403_outc
866873};
867874
868static MACHINE_CONFIG_DERIVED( pc1403, pc1401 )
875static MACHINE_CONFIG_START( pc1403, pc1403_state )
876   MDRV_CPU_ADD("maincpu", SC61860, 192000)        /* 7.8336 MHz */
877   MDRV_CPU_PROGRAM_MAP(pc1401_mem)
878   MDRV_CPU_CONFIG(pc1401_config)
879
880   MDRV_FRAGMENT_ADD( pocketc )
881
869882   MDRV_CPU_REPLACE( "maincpu", SC61860, 256000 )
870883   MDRV_CPU_PROGRAM_MAP( pc1403_mem)
871884   MDRV_CPU_CONFIG( pc1403_config )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team