Previous 15994 Revisions Next

r5281 Monday 20th July, 2009 at 05:18:54 UTC by Miodrag Milanović
[PK8020] Added ROM banking and some devices
[src/mess/drivers]pk8020.c
[src/mess/machine]pk8020.c
[src/mess/video]pk8020.c

src/mess/video/pk8020.c
r5280r5281
1515
1616VIDEO_UPDATE( pk8020 )
1717{
18    UINT8 code1,code2,code3,code4;
19    UINT8 col;
20   int y, x, b;
21
18    //UINT8 code1,code2,code3,code4;
19    //UINT8 col;
20   int y, x, b, j;
21   UINT8 *gfx = memory_region(screen->machine, "gfx1");
22   
2223   // draw image
23   for (x = 0; x < 32; x++)
24/*   for (x = 0; x < 32; x++)
2425   {
2526      for (y = 0; y < 256; y++)
2627      {
r5280r5281
3536         }
3637      }
3738   }
39*/
3840
39
41   for (y = 0; y < 16; y++)
42            {
43               for (x = 0; x < 64; x++)
44               {
45                  UINT8 chr = mess_ram[x +(y*64) + 0x20000] ;
46                  for (j = 0; j < 16; j++) {
47                     UINT8 code = gfx[((chr<<4) + j)];
48                     for (b = 0; b < 8; b++)
49                     {                       
50                        UINT8 col = ((code >> b) & 0x01) ? 0x0f : 0x00;
51                        *BITMAP_ADDR16(bitmap, (y*16)+j, x*8+(7-b)) =  col;
52                     }
53                  }
54               }
55            }
4056   return 0;
4157}
4258
4359PALETTE_INIT( pk8020 )
4460{
4561   int i;
46   for(i=0;i<16;i++) {
47      palette_set_color( machine, i, MAKE_RGB(0,0,0) );
62   for(i=0;i<16;i++) {     
63      palette_set_color( machine, i, MAKE_RGB(i*0x10,i*0x10,i*0x10) );
4864   }
4965}
src/mess/machine/pk8020.c
r5280r5281
99
1010#include "driver.h"
1111#include "cpu/i8085/i8085.h"
12#include "machine/i8255a.h"
13
1214#include "includes/pk8020.h"
1315
16static UINT8 vpage =0;
1417
18static void pk8020_set_bank(running_machine *machine,UINT8 data);
19
1520/* Driver initialization */
1621DRIVER_INIT(pk8020)
1722{
18   memset(mess_ram,0,128*1024);
23   memset(mess_ram,0,130*1024);
1924}
2025
26static READ8_HANDLER(keyboard_r)
27{
28   static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7",
29                                 "LINE8", "LINE9", "LINE10", "LINE11", "LINE12", "LINE13", "LINE14", "LINE15" };
30   UINT8 retVal=0x00;   
31   UINT8 line = 0;
32   if (offset & 0x100)  line=8;
33     
34   if (offset & 0x0001) retVal|=input_port_read(space->machine,keynames[line]);
35   line++;
36   if (offset & 0x0002) retVal|=input_port_read(space->machine,keynames[line]);
37   line++;
38   if (offset & 0x0004) retVal|=input_port_read(space->machine,keynames[line]);
39   line++;
40   if (offset & 0x0008) retVal|=input_port_read(space->machine,keynames[line]);
41   line++;
42   if (offset & 0x0010) retVal|=input_port_read(space->machine,keynames[line]);
43   line++;
44   if (offset & 0x0020) retVal|=input_port_read(space->machine,keynames[line]);
45   line++;
46   if (offset & 0x0040) retVal|=input_port_read(space->machine,keynames[line]);
47   line++;
48   if (offset & 0x0080) retVal|=input_port_read(space->machine,keynames[line]);
49   line++;
50   logerror("keyboard_r :%04x %02x\n",offset,retVal);
51   return retVal;
52}
2153
22MACHINE_RESET( pk8020 )
54static READ8_HANDLER(sysreg_r)
2355{
24   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);   
25   
26   memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
27   memory_install_write8_handler(space, 0x0000, 0x7fff, 0, 0, SMH_UNMAP);
28   memory_install_read8_handler (space, 0x2000, 0x37ff, 0, 0, SMH_BANK(2));
29   memory_install_write8_handler(space, 0x2000, 0x37ff, 0, 0, SMH_UNMAP);
56   return 0xff;
57}
58static WRITE8_HANDLER(sysreg_w)
59{
60   logerror("sysreg_w %02x %02x\n",offset,data);
61   if (BIT(offset,7)==0) {
62      pk8020_set_bank(space->machine,data >> 2);
63   } else if (BIT(offset,6)==0) {
64      // Color
65   } else if (BIT(offset,2)==0) {
66      // LED
67   }
68}
3069
70static READ8_HANDLER(text_r)
71{
72   return mess_ram[0x20000+offset];
73}
3174
32   memory_install_read8_handler (space, 0x4000, 0x5fff, 0, 0, SMH_BANK(7));
33   memory_install_read8_handler (space, 0x6000, 0x7fff, 0, 0, SMH_BANK(8));
34   memory_install_read8_handler (space, 0x8000, 0xbeff, 0, 0, SMH_BANK(9));
35   memory_install_read8_handler (space, 0xbf00, 0xbfff, 0, 0, SMH_BANK(10));
36   memory_install_read8_handler (space, 0xc000, 0xf7ff, 0, 0, SMH_BANK(11));
37   memory_install_read8_handler (space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(12));
38   memory_install_read8_handler (space, 0xfa00, 0xfaff, 0, 0, SMH_BANK(13));
39   memory_install_read8_handler (space, 0xfb00, 0xfbff, 0, 0, SMH_BANK(14));
40   memory_install_read8_handler (space, 0xfc00, 0xfdff, 0, 0, SMH_BANK(15));
41   memory_install_read8_handler (space, 0xfe00, 0xfeff, 0, 0, SMH_BANK(16));
42   memory_install_read8_handler (space, 0xff00, 0xffff, 0, 0, SMH_BANK(17));
75static WRITE8_HANDLER(text_w)
76{
77//   logerror("text_w %02x %02x\n",offset,data);
78   mess_ram[0x20000+offset] = data;
79}
4380
44   memory_install_write8_handler(space, 0x4000, 0x5fff, 0, 0, SMH_BANK(7));
45   memory_install_write8_handler(space, 0x6000, 0x7fff, 0, 0, SMH_BANK(8));
46   memory_install_write8_handler(space, 0x8000, 0xbeff, 0, 0, SMH_BANK(9));
47   memory_install_write8_handler(space, 0xbf00, 0xbfff, 0, 0, SMH_BANK(10));
48   memory_install_write8_handler(space, 0xc000, 0xf7ff, 0, 0, SMH_BANK(11));
49   memory_install_write8_handler(space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(12));
50   memory_install_write8_handler(space, 0xfa00, 0xfaff, 0, 0, SMH_BANK(13));
51   memory_install_write8_handler(space, 0xfb00, 0xfbff, 0, 0, SMH_BANK(14));
52   memory_install_write8_handler(space, 0xfc00, 0xfdff, 0, 0, SMH_BANK(15));
53   memory_install_write8_handler(space, 0xfe00, 0xfeff, 0, 0, SMH_BANK(16));
54   memory_install_write8_handler(space, 0xff00, 0xffff, 0, 0, SMH_BANK(17));
81static READ8_HANDLER(devices_r)
82{
83   const device_config *ppi1 = devtag_get_device(space->machine, "ppi8255_1");
84   const device_config *ppi2 = devtag_get_device(space->machine, "ppi8255_2");
85   const device_config *ppi3 = devtag_get_device(space->machine, "ppi8255_3");
86   logerror("devices_r %02x\n",offset);
87   switch(offset & 0x38)
88   {
89      case 0x08: return i8255a_r(ppi3,offset & 3);
90      case 0x30: return i8255a_r(ppi2,offset & 3);
91      case 0x38: return i8255a_r(ppi1,offset & 3);
92           
93/*      case 0x00:   Timer_Write(Addres,Value);break; //xx00..03
94        case 0x08:   PPI3_Write (Addres,Value);break; //xx08..0B
95        case 0x10:   RS232_Write(Addres,Value);break; //xx10..11
96        case 0x18:   FDC_Write  (Addres,Value);break; //xx18..1B
97        case 0x20:   LAN_Write  (Addres,Value);break; //xx20..21
98        case 0x28:   PIC_Write  (Addres,Value);break; //xx28..29
99        case 0x30:   PPI2_Write (Addres,Value);break; //xx30..33
100        case 0x38:   PPI1_Write (Addres,Value);break; //xx38..3B*/
101   }
102   return 0xff;
103}
55104
56   memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
57   memory_set_bankptr(machine, 2, memory_region(machine,"maincpu") + 0x12000);
105static WRITE8_HANDLER(devices_w)
106{
107   const device_config *ppi1 = devtag_get_device(space->machine, "ppi8255_1");
108   const device_config *ppi2 = devtag_get_device(space->machine, "ppi8255_2");
109   const device_config *ppi3 = devtag_get_device(space->machine, "ppi8255_3");
110   logerror("devices_w %02x %02x\n",offset,data);
111   switch(offset & 0x38)
112   {
113      case 0x08: i8255a_w(ppi3,offset & 3,data); return;
114      case 0x30: i8255a_w(ppi2,offset & 3,data); return;
115      case 0x38: i8255a_w(ppi1,offset & 3,data); return;
116           
117/*      case 0x00:   Timer_Write(Addres,Value);break; //xx00..03
118        case 0x08:   PPI3_Write (Addres,Value);break; //xx08..0B
119        case 0x10:   RS232_Write(Addres,Value);break; //xx10..11
120        case 0x18:   FDC_Write  (Addres,Value);break; //xx18..1B
121        case 0x20:   LAN_Write  (Addres,Value);break; //xx20..21
122        case 0x28:   PIC_Write  (Addres,Value);break; //xx28..29
123        case 0x30:   PPI2_Write (Addres,Value);break; //xx30..33
124        case 0x38:   PPI1_Write (Addres,Value);break; //xx38..3B*/
125   }
126}
58127
59   memory_set_bankptr(machine, 7, mess_ram + 0x4000);
60   memory_set_bankptr(machine, 8, mess_ram + 0x6000);
61   memory_set_bankptr(machine, 9, mess_ram + 0x8000);
62   memory_set_bankptr(machine, 10, mess_ram + 0xbf00);
63   memory_set_bankptr(machine, 11, mess_ram + 0xc000);
64   memory_set_bankptr(machine, 12, mess_ram + 0xf800);
65   memory_set_bankptr(machine, 13, mess_ram + 0xfa00);
66   memory_set_bankptr(machine, 14, mess_ram + 0xfb00);
67   memory_set_bankptr(machine, 15, mess_ram + 0xfc00);
68   memory_set_bankptr(machine, 16, mess_ram + 0xfe00);
69   memory_set_bankptr(machine, 17, mess_ram + 0xff00);
128static void pk8020_set_bank(running_machine *machine,UINT8 data)
129{
130   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);   
131   
132   switch(data & 0x1F) {
133      case 0x00 :
134               {
135                  // ROM
136                  memory_install_read8_handler (space, 0x0000, 0x37ff, 0, 0, SMH_BANK(1));
137                  memory_install_write8_handler(space, 0x0000, 0x37ff, 0, 0, SMH_BANK(2));
138                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
139                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
140                  // Keyboard
141                  memory_install_read8_handler (space, 0x3800, 0x39ff, 0, 0, keyboard_r);
142                  memory_install_write8_handler(space, 0x3800, 0x39ff, 0, 0, SMH_BANK(3));
143                  memory_set_bankptr(machine, 3, mess_ram + 0x3800);
144                  // System reg
145                  memory_install_read8_handler (space, 0x3a00, 0x3aff, 0, 0, sysreg_r);
146                  memory_install_write8_handler(space, 0x3a00, 0x3aff, 0, 0, sysreg_w);
147                  // Devices
148                  memory_install_read8_handler (space, 0x3b00, 0x3bff, 0, 0, devices_r);
149                  memory_install_write8_handler(space, 0x3b00, 0x3bff, 0, 0, devices_w);
150                  // Text Video Memory
151                  memory_install_read8_handler (space, 0x3c00, 0x3fff, 0, 0, text_r);
152                  memory_install_write8_handler(space, 0x3c00, 0x3fff, 0, 0, text_w);
153                  // RAM
154                  memory_install_read8_handler (space, 0x4000, 0xffff, 0, 0, SMH_BANK(4));
155                  memory_install_write8_handler(space, 0x4000, 0xffff, 0, 0, SMH_BANK(5));
156                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);
157                  memory_set_bankptr(machine, 5, mess_ram + 0x4000);
158               }
159               break;
160      case 0x01 : {
161                  // ROM
162                  memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
163                  memory_install_write8_handler(space, 0x0000, 0x1fff, 0, 0, SMH_BANK(2));
164                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
165                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
166                  // RAM
167                  memory_install_read8_handler (space, 0x2000, 0xffff, 0, 0, SMH_BANK(3));
168                  memory_install_write8_handler(space, 0x2000, 0xffff, 0, 0, SMH_BANK(4));
169                  memory_set_bankptr(machine, 3, mess_ram + 0x2000);
170                  memory_set_bankptr(machine, 4, mess_ram + 0x2000);
171               }               
172               break;
173      case 0x02 : {
174                  // ROM
175                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
176                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
177                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
178                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
179                  // RAM
180                  memory_install_read8_handler (space, 0x4000, 0xffff, 0, 0, SMH_BANK(3));
181                  memory_install_write8_handler(space, 0x4000, 0xffff, 0, 0, SMH_BANK(4));
182                  memory_set_bankptr(machine, 3, mess_ram + 0x4000);
183                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);
184               }               
185               break;
186      case 0x03 : {
187                  // RAM
188                  memory_install_read8_handler (space, 0x0000, 0xffff, 0, 0, SMH_BANK(1));
189                  memory_install_write8_handler(space, 0x0000, 0xffff, 0, 0, SMH_BANK(2));
190                  memory_set_bankptr(machine, 1, mess_ram);
191                  memory_set_bankptr(machine, 2, mess_ram);
192               }               
193               break;
194      case 0x04 :
195      case 0x05 :
196               {
197                  // ROM
198                  memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
199                  memory_install_write8_handler(space, 0x0000, 0x1fff, 0, 0, SMH_BANK(2));
200                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
201                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
202                  // RAM
203                  memory_install_read8_handler (space, 0x2000, 0xf7ff, 0, 0, SMH_BANK(3));
204                  memory_install_write8_handler(space, 0x2000, 0xf7ff, 0, 0, SMH_BANK(4));
205                  memory_set_bankptr(machine, 3, mess_ram + 0x2000);
206                  memory_set_bankptr(machine, 4, mess_ram + 0x2000);
207                  // Keyboard
208                  memory_install_read8_handler (space, 0xf800, 0xf9ff, 0, 0, keyboard_r);
209                  memory_install_write8_handler(space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(5));
210                  memory_set_bankptr(machine, 5, mess_ram + 0xf800);
211                  // System reg
212                  memory_install_read8_handler (space, 0xfa00, 0xfaff, 0, 0, sysreg_r);
213                  memory_install_write8_handler(space, 0xfa00, 0xfaff, 0, 0, sysreg_w);
214                  // Devices
215                  memory_install_read8_handler (space, 0xfb00, 0xfbff, 0, 0, devices_r);
216                  memory_install_write8_handler(space, 0xfb00, 0xfbff, 0, 0, devices_w);
217                  // Text Video Memory
218                  memory_install_read8_handler (space, 0xfc00, 0xffff, 0, 0, text_r);
219                  memory_install_write8_handler(space, 0xfc00, 0xffff, 0, 0, text_w);
220               }
221               break;
222      case 0x06 :
223               {
224                  // ROM
225                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
226                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
227                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
228                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
229                  // RAM
230                  memory_install_read8_handler (space, 0x4000, 0xf7ff, 0, 0, SMH_BANK(3));
231                  memory_install_write8_handler(space, 0x4000, 0xf7ff, 0, 0, SMH_BANK(4));
232                  memory_set_bankptr(machine, 3, mess_ram + 0x4000);
233                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);
234                  // Keyboard
235                  memory_install_read8_handler (space, 0xf800, 0xf9ff, 0, 0, keyboard_r);
236                  memory_install_write8_handler(space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(5));
237                  memory_set_bankptr(machine, 5, mess_ram + 0xf800);
238                  // System reg
239                  memory_install_read8_handler (space, 0xfa00, 0xfaff, 0, 0, sysreg_r);
240                  memory_install_write8_handler(space, 0xfa00, 0xfaff, 0, 0, sysreg_w);
241                  // Devices
242                  memory_install_read8_handler (space, 0xfb00, 0xfbff, 0, 0, devices_r);
243                  memory_install_write8_handler(space, 0xfb00, 0xfbff, 0, 0, devices_w);
244                  // Text Video Memory
245                  memory_install_read8_handler (space, 0xfc00, 0xffff, 0, 0, text_r);
246                  memory_install_write8_handler(space, 0xfc00, 0xffff, 0, 0, text_w);
247               }
248               break;   
249      case 0x07 :
250               {
251                  // RAM
252                  memory_install_read8_handler (space, 0x0000, 0xf7ff, 0, 0, SMH_BANK(1));
253                  memory_install_write8_handler(space, 0x0000, 0xf7ff, 0, 0, SMH_BANK(2));
254                  memory_set_bankptr(machine, 1, mess_ram + 0x4000);
255                  memory_set_bankptr(machine, 2, mess_ram + 0x4000);
256                  // Keyboard
257                  memory_install_read8_handler (space, 0xf800, 0xf9ff, 0, 0, keyboard_r);
258                  memory_install_write8_handler(space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(3));
259                  memory_set_bankptr(machine, 3, mess_ram + 0xf800);
260                  // System reg
261                  memory_install_read8_handler (space, 0xfa00, 0xfaff, 0, 0, sysreg_r);
262                  memory_install_write8_handler(space, 0xfa00, 0xfaff, 0, 0, sysreg_w);
263                  // Devices
264                  memory_install_read8_handler (space, 0xfb00, 0xfbff, 0, 0, devices_r);
265                  memory_install_write8_handler(space, 0xfb00, 0xfbff, 0, 0, devices_w);
266                  // Text Video Memory
267                  memory_install_read8_handler (space, 0xfc00, 0xffff, 0, 0, text_r);
268                  memory_install_write8_handler(space, 0xfc00, 0xffff, 0, 0, text_w);
269               }
270               break;   
271      case 0x08 :
272               {
273                  // ROM
274                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
275                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
276                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
277                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
278                  // Keyboard
279                  memory_install_read8_handler (space, 0x3800, 0x39ff, 0, 0, keyboard_r);
280                  memory_install_write8_handler(space, 0x3800, 0x39ff, 0, 0, SMH_BANK(3));
281                  memory_set_bankptr(machine, 3, mess_ram + 0x3800);
282                  // System reg
283                  memory_install_read8_handler (space, 0x3a00, 0x3aff, 0, 0, sysreg_r);
284                  memory_install_write8_handler(space, 0x3a00, 0x3aff, 0, 0, sysreg_w);
285                  // Devices
286                  memory_install_read8_handler (space, 0x3b00, 0x3bff, 0, 0, devices_r);
287                  memory_install_write8_handler(space, 0x3b00, 0x3bff, 0, 0, devices_w);
288                  // Text Video Memory
289                  memory_install_read8_handler (space, 0x3c00, 0x3fff, 0, 0, text_r);
290                  memory_install_write8_handler(space, 0x3c00, 0x3fff, 0, 0, text_w);
291                  // RAM
292                  memory_install_read8_handler (space, 0x4000, 0xbfff, 0, 0, SMH_BANK(4));
293                  memory_install_write8_handler(space, 0x4000, 0xbfff, 0, 0, SMH_BANK(5));
294                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);
295                  memory_set_bankptr(machine, 5, mess_ram + 0x4000);
296                  // Video RAM
297                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
298                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(7));
299                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
300                  memory_set_bankptr(machine, 7, mess_ram + 0x10000 + vpage * 0x4000);
301                 
302               }
303               break;
304      case 0x09 :
305               {
306                  // ROM
307                  memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
308                  memory_install_write8_handler(space, 0x0000, 0x1fff, 0, 0, SMH_BANK(2));
309                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
310                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
311                  // RAM
312                  memory_install_read8_handler (space, 0x2000, 0xbfff, 0, 0, SMH_BANK(3));
313                  memory_install_write8_handler(space, 0x2000, 0xbfff, 0, 0, SMH_BANK(4));
314                  memory_set_bankptr(machine, 3, mess_ram + 0x2000);
315                  memory_set_bankptr(machine, 4, mess_ram + 0x2000);
316                  // Video RAM
317                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(5));
318                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
319                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
320                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
321                 
322               }
323               break;
324      case 0x0A :
325               {
326                  // ROM
327                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
328                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
329                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
330                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
331                  // RAM
332                  memory_install_read8_handler (space, 0x4000, 0xbfff, 0, 0, SMH_BANK(3));
333                  memory_install_write8_handler(space, 0x4000, 0xbfff, 0, 0, SMH_BANK(4));
334                  memory_set_bankptr(machine, 3, mess_ram + 0x4000);
335                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);
336                  // Video RAM
337                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(5));
338                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
339                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
340                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
341                 
342               }
343               break;
344      case 0x0B :
345               {
346                  // RAM
347                  memory_install_read8_handler (space, 0x0000, 0xbfff, 0, 0, SMH_BANK(1));
348                  memory_install_write8_handler(space, 0x0000, 0xbfff, 0, 0, SMH_BANK(2));
349                  memory_set_bankptr(machine, 1, mess_ram + 0x0000);
350                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
351                  // Video RAM
352                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(3));
353                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(4));
354                  memory_set_bankptr(machine, 3, mess_ram + 0x10000 + vpage * 0x4000);
355                  memory_set_bankptr(machine, 4, mess_ram + 0x10000 + vpage * 0x4000);
356                 
357               }
358               break;
359      case 0x0C :
360      case 0x0D :
361               {
362                  // ROM
363                  memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
364                  memory_install_write8_handler(space, 0x0000, 0x1fff, 0, 0, SMH_BANK(2));
365                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
366                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
367                  // RAM
368                  memory_install_read8_handler (space, 0x2000, 0x3fff, 0, 0, SMH_BANK(3));
369                  memory_install_write8_handler(space, 0x2000, 0x3fff, 0, 0, SMH_BANK(4));
370                  memory_set_bankptr(machine, 3, mess_ram + 0x2000);
371                  memory_set_bankptr(machine, 4, mess_ram + 0x2000);
372                  // Video RAM
373                  memory_install_read8_handler (space, 0x4000, 0x7fff, 0, 0, SMH_BANK(5));
374                  memory_install_write8_handler(space, 0x4000, 0x7fff, 0, 0, SMH_BANK(6));
375                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
376                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
377                  // RAM
378                  memory_install_read8_handler (space, 0x8000, 0xfdff, 0, 0, SMH_BANK(7));
379                  memory_install_write8_handler(space, 0x8000, 0xfdff, 0, 0, SMH_BANK(8));
380                  memory_set_bankptr(machine, 7, mess_ram + 0x8000);
381                  memory_set_bankptr(machine, 8, mess_ram + 0x8000);
382                  // Devices
383                  memory_install_read8_handler (space, 0xfe00, 0xfeff, 0, 0, devices_r);
384                  memory_install_write8_handler(space, 0xfe00, 0xfeff, 0, 0, devices_w);
385                  // System reg
386                  memory_install_read8_handler (space, 0xff00, 0xffff, 0, 0, sysreg_r);
387                  memory_install_write8_handler(space, 0xff00, 0xffff, 0, 0, sysreg_w);                 
388               }
389               break;
390      case 0x0E :
391               {
392                  // ROM
393                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
394                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
395                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
396                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
397                  // Video RAM
398                  memory_install_read8_handler (space, 0x4000, 0x7fff, 0, 0, SMH_BANK(3));
399                  memory_install_write8_handler(space, 0x4000, 0x7fff, 0, 0, SMH_BANK(4));
400                  memory_set_bankptr(machine, 3, mess_ram + 0x10000 + vpage * 0x4000);
401                  memory_set_bankptr(machine, 4, mess_ram + 0x10000 + vpage * 0x4000);
402                  // RAM
403                  memory_install_read8_handler (space, 0x8000, 0xfdff, 0, 0, SMH_BANK(5));
404                  memory_install_write8_handler(space, 0x8000, 0xfdff, 0, 0, SMH_BANK(6));
405                  memory_set_bankptr(machine, 5, mess_ram + 0x8000);
406                  memory_set_bankptr(machine, 6, mess_ram + 0x8000);
407                  // Devices
408                  memory_install_read8_handler (space, 0xfe00, 0xfeff, 0, 0, devices_r);
409                  memory_install_write8_handler(space, 0xfe00, 0xfeff, 0, 0, devices_w);
410                  // System reg
411                  memory_install_read8_handler (space, 0xff00, 0xffff, 0, 0, sysreg_r);
412                  memory_install_write8_handler(space, 0xff00, 0xffff, 0, 0, sysreg_w);                 
413               }
414               break;
415      case 0x0F :
416               {
417                  // RAM
418                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
419                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
420                  memory_set_bankptr(machine, 1, mess_ram + 0x0000);
421                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
422                  // Video RAM
423                  memory_install_read8_handler (space, 0x4000, 0x7fff, 0, 0, SMH_BANK(3));
424                  memory_install_write8_handler(space, 0x4000, 0x7fff, 0, 0, SMH_BANK(4));
425                  memory_set_bankptr(machine, 3, mess_ram + 0x10000 + vpage * 0x4000);
426                  memory_set_bankptr(machine, 4, mess_ram + 0x10000 + vpage * 0x4000);
427                  // RAM
428                  memory_install_read8_handler (space, 0x8000, 0xfdff, 0, 0, SMH_BANK(5));
429                  memory_install_write8_handler(space, 0x8000, 0xfdff, 0, 0, SMH_BANK(6));
430                  memory_set_bankptr(machine, 5, mess_ram + 0x8000);
431                  memory_set_bankptr(machine, 6, mess_ram + 0x8000);
432                  // Devices
433                  memory_install_read8_handler (space, 0xfe00, 0xfeff, 0, 0, devices_r);
434                  memory_install_write8_handler(space, 0xfe00, 0xfeff, 0, 0, devices_w);
435                  // System reg
436                  memory_install_read8_handler (space, 0xff00, 0xffff, 0, 0, sysreg_r);
437                  memory_install_write8_handler(space, 0xff00, 0xffff, 0, 0, sysreg_w);                 
438               }
439               break;               
440      case 0x10 :
441               {
442                  // ROM
443                  memory_install_read8_handler (space, 0x0000, 0x5fff, 0, 0, SMH_BANK(1));
444                  memory_install_write8_handler(space, 0x0000, 0x5fff, 0, 0, SMH_BANK(2));
445                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
446                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
447                  // RAM
448                  memory_install_read8_handler (space, 0x6000, 0xf7ff, 0, 0, SMH_BANK(3));
449                  memory_install_write8_handler(space, 0x6000, 0xf7ff, 0, 0, SMH_BANK(4));
450                  memory_set_bankptr(machine, 3, mess_ram + 0x6000);
451                  memory_set_bankptr(machine, 4, mess_ram + 0x6000);                 
452                  // Keyboard
453                  memory_install_read8_handler (space, 0xf800, 0xf9ff, 0, 0, keyboard_r);
454                  memory_install_write8_handler(space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(5));
455                  memory_set_bankptr(machine, 5, mess_ram + 0xf800);
456                  // System reg
457                  memory_install_read8_handler (space, 0xfa00, 0xfaff, 0, 0, sysreg_r);
458                  memory_install_write8_handler(space, 0xfa00, 0xfaff, 0, 0, sysreg_w);
459                  // Devices
460                  memory_install_read8_handler (space, 0xfb00, 0xfbff, 0, 0, devices_r);
461                  memory_install_write8_handler(space, 0xfb00, 0xfbff, 0, 0, devices_w);
462                  // Text Video Memory
463                  memory_install_read8_handler (space, 0xfc00, 0xffff, 0, 0, text_r);
464                  memory_install_write8_handler(space, 0xfc00, 0xffff, 0, 0, text_w);
465               }
466               break;               
467      case 0x11 :
468               {
469                  // ROM
470                  memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
471                  memory_install_write8_handler(space, 0x0000, 0x1fff, 0, 0, SMH_BANK(2));
472                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
473                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
474                  // RAM
475                  memory_install_read8_handler (space, 0x2000, 0xf7ff, 0, 0, SMH_BANK(3));
476                  memory_install_write8_handler(space, 0x2000, 0xf7ff, 0, 0, SMH_BANK(4));
477                  memory_set_bankptr(machine, 3, mess_ram + 0x2000);
478                  memory_set_bankptr(machine, 4, mess_ram + 0x2000);                 
479                  // Keyboard
480                  memory_install_read8_handler (space, 0xf800, 0xf9ff, 0, 0, keyboard_r);
481                  memory_install_write8_handler(space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(5));
482                  memory_set_bankptr(machine, 5, mess_ram + 0xf800);
483                  // System reg
484                  memory_install_read8_handler (space, 0xfa00, 0xfaff, 0, 0, sysreg_r);
485                  memory_install_write8_handler(space, 0xfa00, 0xfaff, 0, 0, sysreg_w);
486                  // Devices
487                  memory_install_read8_handler (space, 0xfb00, 0xfbff, 0, 0, devices_r);
488                  memory_install_write8_handler(space, 0xfb00, 0xfbff, 0, 0, devices_w);
489                  // Text Video Memory
490                  memory_install_read8_handler (space, 0xfc00, 0xffff, 0, 0, text_r);
491                  memory_install_write8_handler(space, 0xfc00, 0xffff, 0, 0, text_w);
492               }
493               break;                 
494      case 0x12 :
495               {
496                  // ROM
497                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
498                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
499                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
500                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
501                  // RAM
502                  memory_install_read8_handler (space, 0x4000, 0xf7ff, 0, 0, SMH_BANK(3));
503                  memory_install_write8_handler(space, 0x4000, 0xf7ff, 0, 0, SMH_BANK(4));
504                  memory_set_bankptr(machine, 3, mess_ram + 0x4000);
505                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);                 
506                  // Keyboard
507                  memory_install_read8_handler (space, 0xf800, 0xf9ff, 0, 0, keyboard_r);
508                  memory_install_write8_handler(space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(5));
509                  memory_set_bankptr(machine, 5, mess_ram + 0xf800);
510                  // System reg
511                  memory_install_read8_handler (space, 0xfa00, 0xfaff, 0, 0, sysreg_r);
512                  memory_install_write8_handler(space, 0xfa00, 0xfaff, 0, 0, sysreg_w);
513                  // Devices
514                  memory_install_read8_handler (space, 0xfb00, 0xfbff, 0, 0, devices_r);
515                  memory_install_write8_handler(space, 0xfb00, 0xfbff, 0, 0, devices_w);
516                  // Text Video Memory
517                  memory_install_read8_handler (space, 0xfc00, 0xffff, 0, 0, text_r);
518                  memory_install_write8_handler(space, 0xfc00, 0xffff, 0, 0, text_w);
519               }
520               break;                 
521      case 0x13 :
522               {
523                  // RAM
524                  memory_install_read8_handler (space, 0x0000, 0xf7ff, 0, 0, SMH_BANK(1));
525                  memory_install_write8_handler(space, 0x0000, 0xf7ff, 0, 0, SMH_BANK(2));
526                  memory_set_bankptr(machine, 1, mess_ram + 0x0000);
527                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);                 
528                  // Keyboard
529                  memory_install_read8_handler (space, 0xf800, 0xf9ff, 0, 0, keyboard_r);
530                  memory_install_write8_handler(space, 0xf800, 0xf9ff, 0, 0, SMH_BANK(3));
531                  memory_set_bankptr(machine, 3, mess_ram + 0xf800);
532                  // System reg
533                  memory_install_read8_handler (space, 0xfa00, 0xfaff, 0, 0, sysreg_r);
534                  memory_install_write8_handler(space, 0xfa00, 0xfaff, 0, 0, sysreg_w);
535                  // Devices
536                  memory_install_read8_handler (space, 0xfb00, 0xfbff, 0, 0, devices_r);
537                  memory_install_write8_handler(space, 0xfb00, 0xfbff, 0, 0, devices_w);
538                  // Text Video Memory
539                  memory_install_read8_handler (space, 0xfc00, 0xffff, 0, 0, text_r);
540                  memory_install_write8_handler(space, 0xfc00, 0xffff, 0, 0, text_w);
541               }
542               break;                                 
543      case 0x14 :
544               {
545                  // ROM
546                  memory_install_read8_handler (space, 0x0000, 0x5fff, 0, 0, SMH_BANK(1));
547                  memory_install_write8_handler(space, 0x0000, 0x5fff, 0, 0, SMH_BANK(2));
548                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
549                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
550                  // RAM
551                  memory_install_read8_handler (space, 0x6000, 0xfdff, 0, 0, SMH_BANK(3));
552                  memory_install_write8_handler(space, 0x6000, 0xfdff, 0, 0, SMH_BANK(4));
553                  memory_set_bankptr(machine, 3, mess_ram + 0x6000);
554                  memory_set_bankptr(machine, 4, mess_ram + 0x6000);
555                  // Devices
556                  memory_install_read8_handler (space, 0xfe00, 0xfeff, 0, 0, devices_r);
557                  memory_install_write8_handler(space, 0xfe00, 0xfeff, 0, 0, devices_w);
558                  // System reg
559                  memory_install_read8_handler (space, 0xff00, 0xffff, 0, 0, sysreg_r);
560                  memory_install_write8_handler(space, 0xff00, 0xffff, 0, 0, sysreg_w);                 
561               }
562               break;
563      case 0x15 :
564               {
565                  // ROM
566                  memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
567                  memory_install_write8_handler(space, 0x0000, 0x1fff, 0, 0, SMH_BANK(2));
568                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
569                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
570                  // RAM
571                  memory_install_read8_handler (space, 0x2000, 0xfdff, 0, 0, SMH_BANK(3));
572                  memory_install_write8_handler(space, 0x2000, 0xfdff, 0, 0, SMH_BANK(4));
573                  memory_set_bankptr(machine, 3, mess_ram + 0x2000);
574                  memory_set_bankptr(machine, 4, mess_ram + 0x2000);
575                  // Devices
576                  memory_install_read8_handler (space, 0xfe00, 0xfeff, 0, 0, devices_r);
577                  memory_install_write8_handler(space, 0xfe00, 0xfeff, 0, 0, devices_w);
578                  // System reg
579                  memory_install_read8_handler (space, 0xff00, 0xffff, 0, 0, sysreg_r);
580                  memory_install_write8_handler(space, 0xff00, 0xffff, 0, 0, sysreg_w);                 
581               }
582               break;
583      case 0x16 :
584               {
585                  // ROM
586                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
587                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
588                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
589                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
590                  // RAM
591                  memory_install_read8_handler (space, 0x4000, 0xfdff, 0, 0, SMH_BANK(3));
592                  memory_install_write8_handler(space, 0x4000, 0xfdff, 0, 0, SMH_BANK(4));
593                  memory_set_bankptr(machine, 3, mess_ram + 0x4000);
594                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);
595                  // Devices
596                  memory_install_read8_handler (space, 0xfe00, 0xfeff, 0, 0, devices_r);
597                  memory_install_write8_handler(space, 0xfe00, 0xfeff, 0, 0, devices_w);
598                  // System reg
599                  memory_install_read8_handler (space, 0xff00, 0xffff, 0, 0, sysreg_r);
600                  memory_install_write8_handler(space, 0xff00, 0xffff, 0, 0, sysreg_w);                 
601               }
602               break;
603      case 0x17 :
604               {
605                  // RAM
606                  memory_install_read8_handler (space, 0x0000, 0xfdff, 0, 0, SMH_BANK(1));
607                  memory_install_write8_handler(space, 0x0000, 0xfdff, 0, 0, SMH_BANK(2));
608                  memory_set_bankptr(machine, 1, mess_ram);
609                  memory_set_bankptr(machine, 2, mess_ram);
610                  // Devices
611                  memory_install_read8_handler (space, 0xfe00, 0xfeff, 0, 0, devices_r);
612                  memory_install_write8_handler(space, 0xfe00, 0xfeff, 0, 0, devices_w);
613                  // System reg
614                  memory_install_read8_handler (space, 0xff00, 0xffff, 0, 0, sysreg_r);
615                  memory_install_write8_handler(space, 0xff00, 0xffff, 0, 0, sysreg_w);                 
616               }
617               break;
618      case 0x18 :
619               {
620                  // ROM
621                  memory_install_read8_handler (space, 0x0000, 0x5fff, 0, 0, SMH_BANK(1));
622                  memory_install_write8_handler(space, 0x0000, 0x5fff, 0, 0, SMH_BANK(2));
623                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
624                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
625                  // RAM
626                  memory_install_read8_handler (space, 0x6000, 0xbeff, 0, 0, SMH_BANK(3));
627                  memory_install_write8_handler(space, 0x6000, 0xbeff, 0, 0, SMH_BANK(4));
628                  memory_set_bankptr(machine, 3, mess_ram + 0x6000);
629                  memory_set_bankptr(machine, 4, mess_ram + 0x6000);
630                  // System reg
631                  memory_install_read8_handler (space, 0xbf00, 0xbfff, 0, 0, sysreg_r);
632                  memory_install_write8_handler(space, 0xbf00, 0xbfff, 0, 0, sysreg_w);                 
633                  // Video RAM
634                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(5));
635                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
636                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
637                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
638               }
639               break;
640      case 0x19 :
641               {
642                  // ROM
643                  memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
644                  memory_install_write8_handler(space, 0x0000, 0x1fff, 0, 0, SMH_BANK(2));
645                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
646                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
647                  // RAM
648                  memory_install_read8_handler (space, 0x2000, 0xbeff, 0, 0, SMH_BANK(3));
649                  memory_install_write8_handler(space, 0x2000, 0xbeff, 0, 0, SMH_BANK(4));
650                  memory_set_bankptr(machine, 3, mess_ram + 0x2000);
651                  memory_set_bankptr(machine, 4, mess_ram + 0x2000);
652                  // System reg
653                  memory_install_read8_handler (space, 0xbf00, 0xbfff, 0, 0, sysreg_r);
654                  memory_install_write8_handler(space, 0xbf00, 0xbfff, 0, 0, sysreg_w);                 
655                  // Video RAM
656                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(5));
657                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
658                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
659                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
660               }
661               break;
662      case 0x1A :
663               {
664                  // ROM
665                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
666                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
667                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
668                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
669                  // RAM
670                  memory_install_read8_handler (space, 0x4000, 0xbeff, 0, 0, SMH_BANK(3));
671                  memory_install_write8_handler(space, 0x4000, 0xbeff, 0, 0, SMH_BANK(4));
672                  memory_set_bankptr(machine, 3, mess_ram + 0x4000);
673                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);
674                  // System reg
675                  memory_install_read8_handler (space, 0xbf00, 0xbfff, 0, 0, sysreg_r);
676                  memory_install_write8_handler(space, 0xbf00, 0xbfff, 0, 0, sysreg_w);                 
677                  // Video RAM
678                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(5));
679                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
680                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
681                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
682               }
683               break;
684      case 0x1B :
685               {
686                  // RAM
687                  memory_install_read8_handler (space, 0x0000, 0xbeff, 0, 0, SMH_BANK(1));
688                  memory_install_write8_handler(space, 0x0000, 0xbeff, 0, 0, SMH_BANK(2));
689                  memory_set_bankptr(machine, 1, mess_ram);
690                  memory_set_bankptr(machine, 2, mess_ram);
691                  // System reg
692                  memory_install_read8_handler (space, 0xbf00, 0xbfff, 0, 0, sysreg_r);
693                  memory_install_write8_handler(space, 0xbf00, 0xbfff, 0, 0, sysreg_w);                 
694                  // Video RAM
695                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(3));
696                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(4));
697                  memory_set_bankptr(machine, 3, mess_ram + 0x10000 + vpage * 0x4000);
698                  memory_set_bankptr(machine, 4, mess_ram + 0x10000 + vpage * 0x4000);
699               }
700               break;
701      case 0x1C :
702               {
703                  // ROM
704                  memory_install_read8_handler (space, 0x0000, 0x5fff, 0, 0, SMH_BANK(1));
705                  memory_install_write8_handler(space, 0x0000, 0x5fff, 0, 0, SMH_BANK(2));
706                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
707                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
708                  // RAM
709                  memory_install_read8_handler (space, 0x6000, 0xbfff, 0, 0, SMH_BANK(3));
710                  memory_install_write8_handler(space, 0x6000, 0xbfff, 0, 0, SMH_BANK(4));
711                  memory_set_bankptr(machine, 3, mess_ram + 0x6000);
712                  memory_set_bankptr(machine, 4, mess_ram + 0x6000);
713                  // Video RAM
714                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(5));
715                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
716                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
717                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
718               }
719               break;
720      case 0x1D :
721               {
722                  // ROM
723                  memory_install_read8_handler (space, 0x0000, 0x1fff, 0, 0, SMH_BANK(1));
724                  memory_install_write8_handler(space, 0x0000, 0x1fff, 0, 0, SMH_BANK(2));
725                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
726                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
727                  // RAM
728                  memory_install_read8_handler (space, 0x2000, 0xbfff, 0, 0, SMH_BANK(3));
729                  memory_install_write8_handler(space, 0x2000, 0xbfff, 0, 0, SMH_BANK(4));
730                  memory_set_bankptr(machine, 3, mess_ram + 0x2000);
731                  memory_set_bankptr(machine, 4, mess_ram + 0x2000);
732                  // Video RAM
733                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(5));
734                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
735                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
736                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
737               }
738               break;
739      case 0x1E :
740               {
741                  // ROM
742                  memory_install_read8_handler (space, 0x0000, 0x3fff, 0, 0, SMH_BANK(1));
743                  memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_BANK(2));
744                  memory_set_bankptr(machine, 1, memory_region(machine,"maincpu") + 0x10000);
745                  memory_set_bankptr(machine, 2, mess_ram + 0x0000);
746                  // RAM
747                  memory_install_read8_handler (space, 0x4000, 0xbfff, 0, 0, SMH_BANK(3));
748                  memory_install_write8_handler(space, 0x4000, 0xbfff, 0, 0, SMH_BANK(4));
749                  memory_set_bankptr(machine, 3, mess_ram + 0x4000);
750                  memory_set_bankptr(machine, 4, mess_ram + 0x4000);
751                  // Video RAM
752                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(5));
753                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(6));
754                  memory_set_bankptr(machine, 5, mess_ram + 0x10000 + vpage * 0x4000);
755                  memory_set_bankptr(machine, 6, mess_ram + 0x10000 + vpage * 0x4000);
756               }
757               break;
758      case 0x1F :
759               {
760                  // RAM
761                  memory_install_read8_handler (space, 0x0000, 0xbfff, 0, 0, SMH_BANK(1));
762                  memory_install_write8_handler(space, 0x0000, 0xbfff, 0, 0, SMH_BANK(2));
763                  memory_set_bankptr(machine, 1, mess_ram);
764                  memory_set_bankptr(machine, 2, mess_ram);
765                  // Video RAM
766                  memory_install_read8_handler (space, 0xc000, 0xffff, 0, 0, SMH_BANK(3));
767                  memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(4));
768                  memory_set_bankptr(machine, 3, mess_ram + 0x10000 + vpage * 0x4000);
769                  memory_set_bankptr(machine, 4, mess_ram + 0x10000 + vpage * 0x4000);
770               }
771               break;
772               
773   }
70774}
775MACHINE_RESET( pk8020 )
776{
777   pk8020_set_bank(machine,0);
778}
src/mess/drivers/pk8020.c
r5280r5281
99
1010#include "driver.h"
1111#include "cpu/i8085/i8085.h"
12#include "machine/i8255a.h"
1213#include "includes/pk8020.h"
1314
1415/* Address maps */
1516static ADDRESS_MAP_START(pk8020_mem, ADDRESS_SPACE_PROGRAM, 8)
16   AM_RANGE( 0x0000, 0x1fff ) AM_RAMBANK( 1)
17   AM_RANGE( 0x2000, 0x37ff ) AM_RAMBANK( 2)
18   AM_RANGE( 0x3800, 0x39ff ) AM_RAMBANK( 3)
19   AM_RANGE( 0x3a00, 0x3aff ) AM_RAMBANK( 4)
20   AM_RANGE( 0x3b00, 0x3bff ) AM_RAMBANK( 5)
21   AM_RANGE( 0x3c00, 0x3fff ) AM_RAMBANK( 6)
22   AM_RANGE( 0x4000, 0x5fff ) AM_RAMBANK( 7)
23   AM_RANGE( 0x6000, 0x7fff ) AM_RAMBANK( 8)
24   AM_RANGE( 0x8000, 0xbeff ) AM_RAMBANK( 9)
25   AM_RANGE( 0xbf00, 0xbfff ) AM_RAMBANK(10)
26   AM_RANGE( 0xc000, 0xf7ff ) AM_RAMBANK(11)
27   AM_RANGE( 0xf800, 0xf9ff ) AM_RAMBANK(12)
28   AM_RANGE( 0xfa00, 0xfaff ) AM_RAMBANK(13)
29   AM_RANGE( 0xfb00, 0xfbff ) AM_RAMBANK(14)
30   AM_RANGE( 0xfc00, 0xfdff ) AM_RAMBANK(15)
31   AM_RANGE( 0xfe00, 0xfeff ) AM_RAMBANK(16)
32   AM_RANGE( 0xff00, 0xffff ) AM_RAMBANK(17)
3317ADDRESS_MAP_END
3418
3519static ADDRESS_MAP_START( pk8020_io , ADDRESS_SPACE_IO, 8)
r5280r5281
3923
4024/* Input ports */
4125static INPUT_PORTS_START( pk8020 )
26   PORT_START("LINE0")
27      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_F9)
28      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
29      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
30      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
31      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
32      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
33      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
34      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
35   PORT_START("LINE1")
36      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
37      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
38      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
39      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
40      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
41      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
42      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
43      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
44   PORT_START("LINE2")
45      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
46      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
47      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
48      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
49      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
50      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
51      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
52      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
53   PORT_START("LINE3")
54      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
55      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
56      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
57      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
58      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH)
59      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
60      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("^") PORT_CODE(KEYCODE_TILDE)
61      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("_") PORT_CODE(KEYCODE_EQUALS)
62   PORT_START("LINE4")
63      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
64      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
65      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
66      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
67      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
68      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
69      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
70      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
71   PORT_START("LINE5")
72      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
73      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
74      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_QUOTE)
75      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON)
76      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA)
77      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
78      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
79      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_SLASH)
80   PORT_START("LINE6")
81      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
82      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("STRN") PORT_CODE(KEYCODE_MINUS_PAD)
83      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("STOP") PORT_CODE(KEYCODE_F12)
84      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("IZ") PORT_CODE(KEYCODE_ASTERISK)
85      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("VZ") PORT_CODE(KEYCODE_SLASH_PAD)
86      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE)
87      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB)
88      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
89   PORT_START("LINE7")
90      // All keys in this line are reversed logic
91      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT)
92      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Alf") PORT_CODE(KEYCODE_F11)
93      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Graf") PORT_CODE(KEYCODE_F10)
94      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Prf") PORT_CODE(KEYCODE_ESC)
95      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Sel") PORT_CODE(KEYCODE_RCONTROL)
96      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Upr") PORT_CODE(KEYCODE_LCONTROL)
97      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("OO") PORT_CODE(KEYCODE_LALT)
98      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT)
99   PORT_START("LINE8")
100      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 0") PORT_CODE(KEYCODE_0_PAD)
101      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 1") PORT_CODE(KEYCODE_1_PAD)
102      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 2") PORT_CODE(KEYCODE_2_PAD)
103      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 3") PORT_CODE(KEYCODE_3_PAD)
104      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 4") PORT_CODE(KEYCODE_4_PAD)
105      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 5") PORT_CODE(KEYCODE_5_PAD)
106      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 6") PORT_CODE(KEYCODE_6_PAD)
107      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 7") PORT_CODE(KEYCODE_7_PAD)
108   PORT_START("LINE9")
109      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 8") PORT_CODE(KEYCODE_8_PAD)
110      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num 9") PORT_CODE(KEYCODE_9_PAD)
111      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
112      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED)
113      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
114      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
115      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Num .") PORT_CODE(KEYCODE_DEL_PAD)
116      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
117   PORT_START("LINE10")
118      PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
119      PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
120      PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3)
121      PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4)
122      PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5)
123      PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
124      PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
125      PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
126   PORT_START("LINE11")
127      PORT_BIT(0xFF, IP_ACTIVE_HIGH, IPT_UNUSED)
128   PORT_START("LINE12")
129      PORT_BIT(0xFF, IP_ACTIVE_HIGH, IPT_UNUSED)
130   PORT_START("LINE13")
131      PORT_BIT(0xFF, IP_ACTIVE_HIGH, IPT_UNUSED)
132   PORT_START("LINE14")
133      PORT_BIT(0xFF, IP_ACTIVE_HIGH, IPT_UNUSED)
134   PORT_START("LINE15")
135      PORT_BIT(0xFF, IP_ACTIVE_HIGH, IPT_UNUSED)
42136INPUT_PORTS_END
43137
138static I8255A_INTERFACE( pk8020_ppi8255_interface_1 )
139{
140   DEVCB_NULL,
141   DEVCB_NULL,
142   DEVCB_NULL,
143   DEVCB_NULL,
144   DEVCB_NULL,
145   DEVCB_NULL
146};
44147
148static I8255A_INTERFACE( pk8020_ppi8255_interface_2 )
149{
150   DEVCB_NULL,
151   DEVCB_NULL,
152   DEVCB_NULL,
153   DEVCB_NULL,
154   DEVCB_NULL,
155   DEVCB_NULL
156};
157
158static I8255A_INTERFACE( pk8020_ppi8255_interface_3 )
159{
160   DEVCB_NULL,
161   DEVCB_NULL,
162   DEVCB_NULL,
163   DEVCB_NULL,
164   DEVCB_NULL,
165   DEVCB_NULL
166};
167
45168/* Machine driver */
46169static MACHINE_DRIVER_START( pk8020 )
47170  /* basic machine hardware */
48   MDRV_CPU_ADD("maincpu", 8080, 2500000)
171   MDRV_CPU_ADD("maincpu", 8080, XTAL_20MHz / 8)
49172   MDRV_CPU_PROGRAM_MAP(pk8020_mem)
50173   MDRV_CPU_IO_MAP(pk8020_io)
51174
r5280r5281
56179   MDRV_SCREEN_REFRESH_RATE(50)
57180   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
58181   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
59   MDRV_SCREEN_SIZE(256, 256)
60   MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1)
182   MDRV_SCREEN_SIZE(512, 256)
183   MDRV_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
61184   MDRV_PALETTE_LENGTH(16)
62185   MDRV_PALETTE_INIT(pk8020)
63186
64187   MDRV_VIDEO_START(pk8020)
65188   MDRV_VIDEO_UPDATE(pk8020)
189   
190    MDRV_I8255A_ADD( "ppi8255_1", pk8020_ppi8255_interface_1 )
191    MDRV_I8255A_ADD( "ppi8255_2", pk8020_ppi8255_interface_2 )   
192    MDRV_I8255A_ADD( "ppi8255_3", pk8020_ppi8255_interface_3 )
66193MACHINE_DRIVER_END
67194
68195/* ROM definition */
r5280r5281
70197ROM_START( korvet )
71198    ROM_REGION( 0x16000, "maincpu", ROMREGION_ERASEFF )
72199    ROM_LOAD( "korvet11.rom", 0x10000, 0x6000, CRC(81BDC2AF) SHA1(c3484c3f1f3d252475979283c073286b8661d2b9) )
200   ROM_REGION( 0x2000, "gfx1", 0 )
201   ROM_LOAD ( "korvet2.fnt", 0x0000, 0x2000, CRC(FB1CD3D4))   
73202ROM_END
74203
75204static SYSTEM_CONFIG_START(pk8020)
76    CONFIG_RAM_DEFAULT(128 * 1024)
205    CONFIG_RAM_DEFAULT((128 +2) * 1024)
77206SYSTEM_CONFIG_END
78207
79208/* Driver */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team