Previous 199869 Revisions Next

r31134 Saturday 28th June, 2014 at 19:56:06 UTC by Sandro Ronco
(MESS) glcolor: added LCD emulation and inputs. [Sandro Ronco]

(MESS) moved glcolor carts from genius.xml to glcolor.xml. (nw)
[hash]genius.xml glcolor.xml*
[src/mess/drivers]prestige.c

trunk/hash/genius.xml
r31133r31134
137137      </part>
138138   </software>
139139
140<!-- According to the boxart, this is compatible with: Leader Color -->
141   <software name="fling">
142      <description>Fling - Die Buchstaben-Schleuder</description>
143      <year>200?</year>
144      <publisher>Video Technology</publisher>
145      <info name="serial" value="80-2095" />
146
147      <part name="rom" interface="genius_rom">
148         <dataarea name="rom" size="0x40000">
149            <rom name="27-5581-00" size="0x40000" crc="5288ce4b" sha1="1b0ed6df8e589a48579508b2df4bf1475d08aedb" offset="0" />
150         </dataarea>
151      </part>
152   </software>
153
154<!-- According to the boxart, this is compatible with: Leader Color/Super Color/Magic Color -->
155   <software name="carlchen">
156      <description>Carlchen Clever - Wort- und Zahlenlabyrinth</description>
157      <year>200?</year>
158      <publisher>Video Technology</publisher>
159      <info name="serial" value="80-2096" />
160
161      <part name="rom" interface="genius_rom">
162         <dataarea name="rom" size="0x40000">
163            <rom name="27-5502-00" size="0x40000" crc="8ccf640b" sha1="0f327ad08f79c00dbd1865084f55f205d8da27de" offset="0" />
164         </dataarea>
165      </part>
166   </software>
167
168
169
170<!-- Third chunk of dumps, misc compatibility -->
171
172<!-- According to the boxart, this is compatible with: Master Mega Color -->
173   <software name="zahlenkn">
174      <description>Zahlenknacker</description>
175      <year>200?</year>
176      <publisher>Video Technology</publisher>
177      <info name="serial" value="80-15772" />
178
179      <part name="rom" interface="genius_rom">
180         <dataarea name="rom" size="0x40000">
181            <rom name="27-5500-00" size="0x40000" crc="7f4c1f2d" sha1="f275dc590927137d51576aae398bcb395d79f6c3" offset="0" />
182         </dataarea>
183      </part>
184   </software>
185
186<!-- According to the boxart, this is compatible with: Master Mega Color -->
187   <software name="tatortum">
188      <description>Tatort Umwelt</description>
189      <year>200?</year>
190      <publisher>Video Technology</publisher>
191      <info name="serial" value="80-15773" />
192
193      <part name="rom" interface="genius_rom">
194         <dataarea name="rom" size="0x40000">
195            <rom name="27-5498-00" size="0x40000" crc="8d811939" sha1="3b1aacfbebc84598daaae1d06c103ee3e1bd6db6" offset="0" />
196         </dataarea>
197      </part>
198   </software>
199
200140<!-- According to the boxart, this is compatible with: Junior Redstar/Redstar 2 -->
201141   <software name="wortspie">
202142      <description>Wortspiele</description>
trunk/hash/glcolor.xml
r0r31134
1<?xml version="1.0"?>
2<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3<softwarelist name="glcolor" description="VTech Genius Leader Color cartridges">
4
5<!-- According to the boxart, this is compatible with: Leader Color -->
6   <software name="fling">
7      <description>Fling - Die Buchstaben-Schleuder</description>
8      <year>199?</year>
9      <publisher>Video Technology</publisher>
10      <info name="serial" value="80-2095" />
11
12      <part name="rom" interface="genius_cart">
13         <dataarea name="rom" size="0x40000">
14            <rom name="27-5581-00" size="0x40000" crc="5288ce4b" sha1="1b0ed6df8e589a48579508b2df4bf1475d08aedb" offset="0" />
15         </dataarea>
16      </part>
17   </software>
18
19<!-- According to the boxart, this is compatible with: Leader Color/Super Color/Magic Color -->
20   <software name="carlchen">
21      <description>Carlchen Clever - Wort- und Zahlenlabyrinth</description>
22      <year>199?</year>
23      <publisher>Video Technology</publisher>
24      <info name="serial" value="80-2096" />
25
26      <part name="rom" interface="genius_cart">
27         <dataarea name="rom" size="0x40000">
28            <rom name="27-5502-00" size="0x40000" crc="8ccf640b" sha1="0f327ad08f79c00dbd1865084f55f205d8da27de" offset="0" />
29         </dataarea>
30      </part>
31   </software>
32
33<!-- According to the boxart, this is compatible with: Master Mega Color -->
34   <software name="zahlenkn">
35      <description>Zahlenknacker</description>
36      <year>199?</year>
37      <publisher>Video Technology</publisher>
38      <info name="serial" value="80-15772" />
39
40      <part name="rom" interface="genius_cart">
41         <dataarea name="rom" size="0x40000">
42            <rom name="27-5500-00" size="0x40000" crc="7f4c1f2d" sha1="f275dc590927137d51576aae398bcb395d79f6c3" offset="0" />
43         </dataarea>
44      </part>
45   </software>
46
47<!-- According to the boxart, this is compatible with: Master Mega Color -->
48   <software name="tatortum">
49      <description>Tatort Umwelt</description>
50      <year>199?</year>
51      <publisher>Video Technology</publisher>
52      <info name="serial" value="80-15773" />
53
54      <part name="rom" interface="genius_cart">
55         <dataarea name="rom" size="0x40000">
56            <rom name="27-5498-00" size="0x40000" crc="8d811939" sha1="3b1aacfbebc84598daaae1d06c103ee3e1bd6db6" offset="0" />
57         </dataarea>
58      </part>
59   </software>
60</softwarelist>
Property changes on: trunk/hash/glcolor.xml
Added: svn:mime-type
   + text/xml
Added: svn:eol-style
   + native
trunk/src/mess/drivers/prestige.c
r31133r31134
9191      : driver_device(mconfig, type, tag),
9292         m_maincpu(*this, "maincpu"),
9393         m_ram(*this, RAM_TAG),
94         m_keyboard(*this, "KEY"),
9495         m_bank1(*this, "bank1"),
9596         m_bank2(*this, "bank2"),
9697         m_bank3(*this, "bank3"),
r31133r31134
100101
101102   required_device<cpu_device> m_maincpu;
102103   required_device<ram_device> m_ram;
104   required_ioport_array<16> m_keyboard;
103105   required_memory_bank m_bank1;
104106   required_memory_bank m_bank2;
105107   required_memory_bank m_bank3;
r31133r31134
112114   UINT8 m_mousex;
113115   UINT8 m_mousey;
114116   UINT8 *m_vram;
117   struct
118   {
119      UINT16  addr1;
120      UINT16  addr2;
121      UINT8   lcd_w;
122      UINT8   lcd_h;
123      UINT8   fb_width;
124      UINT8   split_pos;
125   } m_lcdc;
115126
116127   virtual void machine_start();
117   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
128   UINT32 screen_update(int bpp, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
129   UINT32 screen_update_1bpp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
130   UINT32 screen_update_2bpp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
118131
119132   DECLARE_READ8_MEMBER( bankswitch_r );
120133   DECLARE_WRITE8_MEMBER( bankswitch_w );
r31133r31134
122135   DECLARE_WRITE8_MEMBER( kb_w );
123136   DECLARE_READ8_MEMBER( mouse_r );
124137   DECLARE_WRITE8_MEMBER( mouse_w );
138   DECLARE_WRITE8_MEMBER( lcdc_w );
125139   DECLARE_PALETTE_INIT(prestige);
140   DECLARE_PALETTE_INIT(glcolor);
126141   TIMER_DEVICE_CALLBACK_MEMBER(irq_timer);
127142   IRQ_CALLBACK_MEMBER(prestige_int_ack);
128143};
r31133r31134
166181      break;
167182
168183   case 5:
169      if (ioport("CART_TYPE")->read() == 0x01)
184      if (m_bank[5] == data)
185         break;
186
187      if (data & 0x20)
170188      {
189         program.install_ram(0x8000, 0xbfff, m_vram);
190      }
191      else if (ioport("CART_TYPE")->read() == 0x01)
192      {
171193         //cartridge memory is writable
172194         if (data & 0x02)
173195            program.install_readwrite_bank(0x4000, 0x7fff, "bank2");
r31133r31134
183205      {
184206         //cartridge memory is read-only
185207         program.unmap_write(0x4000, 0xbfff);
208         program.install_read_bank(0x8000, 0xbfff, "bank3");
186209      }
187210      break;
188211   case 6:
r31133r31134
194217
195218READ8_MEMBER( prestige_state::kb_r )
196219{
197   static const char *const bitnames[2][8] =
198   {
199      {"LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7"},
200      {"LINE8", "LINE9", "LINEA", "LINEB", "LINEC", "LINED", "LINEE", "LINEF"}
201   };
202
203220   UINT8 data = 0xff;
204221
205222   for (int line=0; line<8; line++)
206223      if (!(m_kb_matrix & (1<<line)))
207         data &= ioport(bitnames[offset][line])->read();
224         data &= m_keyboard[offset * 8 + line]->read();
208225
209226   return data;
210227}
r31133r31134
228245         break;
229246   }
230247
248   data = MIN(data, +127);
249   data = MAX(data, -127);
250
231251   return 0x80 + data;
232252}
233253
r31133r31134
244264   }
245265}
246266
267WRITE8_MEMBER( prestige_state::lcdc_w )
268{
269   switch(offset)
270   {
271      case 0x02:
272         m_lcdc.lcd_w = data;
273         break;
274      case 0x04:
275         m_lcdc.lcd_h = data;
276         break;
277      case 0x06:
278         m_lcdc.addr1 = (m_lcdc.addr1 & 0xff00) | data;
279         break;
280      case 0x07:
281         m_lcdc.addr1 = (m_lcdc.addr1 & 0x00ff) | (data << 8);
282         break;
283      case 0x08:
284         m_lcdc.addr2 = (m_lcdc.addr2 & 0xff00) | data;
285         break;
286      case 0x09:
287         m_lcdc.addr2 = (m_lcdc.addr2 & 0x00ff) | (data << 8);
288         break;
289      case 0x0a:
290         m_lcdc.split_pos = data;
291         break;
292      case 0x0d:
293         m_lcdc.fb_width = data;
294         break;
295      default:
296         logerror("Unknown LCDC reg write %x = %x\n", offset, data);
297   }
298}
299
300
247301static ADDRESS_MAP_START(prestige_mem, AS_PROGRAM, 8, prestige_state)
248302   AM_RANGE(0x0000, 0x3fff) AM_ROMBANK("bank1")
249303   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank2")
r31133r31134
256310   ADDRESS_MAP_UNMAP_HIGH
257311   ADDRESS_MAP_GLOBAL_MASK(0xff)
258312   AM_RANGE(0x04, 0x05) AM_READWRITE(mouse_r, mouse_w)
313   AM_RANGE(0x30, 0x3f) AM_WRITE(lcdc_w)
314   AM_RANGE(0x40, 0x40) AM_WRITE(kb_w)
315   AM_RANGE(0x41, 0x42) AM_READ(kb_r)
259316   AM_RANGE(0x50, 0x56) AM_READWRITE(bankswitch_r, bankswitch_w)
317ADDRESS_MAP_END
318
319static ADDRESS_MAP_START( glcolor_io , AS_IO, 8, prestige_state)
320   ADDRESS_MAP_UNMAP_HIGH
321   ADDRESS_MAP_GLOBAL_MASK(0xff)
322   AM_RANGE(0x30, 0x3f) AM_WRITE(lcdc_w)
260323   AM_RANGE(0x40, 0x40) AM_WRITE(kb_w)
261324   AM_RANGE(0x41, 0x42) AM_READ(kb_r)
325   AM_RANGE(0x50, 0x56) AM_READWRITE(bankswitch_r, bankswitch_w)
262326ADDRESS_MAP_END
263327
264328/* Input ports */
r31133r31134
274338   PORT_START("MOUSEY")
275339   PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(2)
276340
277   PORT_START("LINE0")
341   PORT_START("KEY.0")
278342   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left mouse button")  PORT_CODE(MOUSECODE_BUTTON1)
279343   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1")  PORT_CODE(KEYCODE_1)
280344   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9")  PORT_CODE(KEYCODE_9)
r31133r31134
284348   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT)
285349   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",")  PORT_CODE(KEYCODE_COMMA)
286350
287   PORT_START("LINE1")
351   PORT_START("KEY.1")
288352   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right mouse button") PORT_CODE(MOUSECODE_BUTTON2)
289353   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2")  PORT_CODE(KEYCODE_2)
290354   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0")  PORT_CODE(KEYCODE_0)
r31133r31134
294358   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("z")  PORT_CODE(KEYCODE_Z)
295359   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".")  PORT_CODE(KEYCODE_STOP)
296360
297   PORT_START("LINE2")
361   PORT_START("KEY.2")
298362   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Mouse Up (KB)")  PORT_CODE(KEYCODE_8_PAD)
299363   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3")  PORT_CODE(KEYCODE_3)
300364   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'")  PORT_CODE(KEYCODE_QUOTE)
r31133r31134
304368   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("x")  PORT_CODE(KEYCODE_X)
305369   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-")  PORT_CODE(KEYCODE_MINUS)
306370
307   PORT_START("LINE3")
371   PORT_START("KEY.3")
308372   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Mouse Left (KB)")    PORT_CODE(KEYCODE_4_PAD)
309373   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4")  PORT_CODE(KEYCODE_4)
310374   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xc2\xa1")   PORT_CODE(KEYCODE_CLOSEBRACE)
r31133r31134
314378   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("c")  PORT_CODE(KEYCODE_C)
315379   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
316380
317   PORT_START("LINE4")
381   PORT_START("KEY.4")
318382   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Mouse Right (KB)")   PORT_CODE(KEYCODE_6_PAD)
319383   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5")  PORT_CODE(KEYCODE_5)
320384   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace")  PORT_CODE(KEYCODE_BACKSPACE)
r31133r31134
324388   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("v")  PORT_CODE(KEYCODE_V)
325389   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right Shift")    PORT_CODE(KEYCODE_RSHIFT)
326390
327   PORT_START("LINE5")
391   PORT_START("KEY.5")
328392   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Mouse Down (KB)")    PORT_CODE(KEYCODE_2_PAD)
329393   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6")  PORT_CODE(KEYCODE_6)
330394   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC)
r31133r31134
334398   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("b")  PORT_CODE(KEYCODE_B)
335399   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Help")   PORT_CODE(KEYCODE_PGUP)
336400
337   PORT_START("LINE6")
401   PORT_START("KEY.6")
338402   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("??") PORT_CODE(KEYCODE_F10)
339403   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7")  PORT_CODE(KEYCODE_7)
340404   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("q")  PORT_CODE(KEYCODE_Q)
r31133r31134
344408   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("n")  PORT_CODE(KEYCODE_N)
345409   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Symbol") PORT_CODE(KEYCODE_PGDN)
346410
347   PORT_START("LINE7")
411   PORT_START("KEY.7")
348412   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("OFF")    PORT_CODE(KEYCODE_F9)
349413   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8")  PORT_CODE(KEYCODE_8)
350414   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("w")  PORT_CODE(KEYCODE_W)
r31133r31134
354418   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("m")  PORT_CODE(KEYCODE_M)
355419   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Answer") PORT_CODE(KEYCODE_END)
356420
357   PORT_START("LINE8")
421   PORT_START("KEY.8")
358422   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space")  PORT_CODE(KEYCODE_SPACE)
359423   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Word Games") PORT_CODE(KEYCODE_F1)
360424   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Player") PORT_CODE(KEYCODE_F2)
361425   PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
362426
363   PORT_START("LINE9")
427   PORT_START("KEY.9")
364428   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt")    PORT_CODE(KEYCODE_LALT)
365429   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Mathematics")    PORT_CODE(KEYCODE_F3)
366430   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Level")      PORT_CODE(KEYCODE_F4)
367431   PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
368432
369   PORT_START("LINEA")
433   PORT_START("KEY.10")
370434   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Repeat") PORT_CODE(KEYCODE_RALT)
371435   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Trivia") PORT_CODE(KEYCODE_F5)
372436   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cartridge")  PORT_CODE(KEYCODE_F6)
373437   PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
374438
375   PORT_START("LINEB")
439   PORT_START("KEY.11")
376440   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left")   PORT_CODE(KEYCODE_LEFT)
377441   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Logic Games")    PORT_CODE(KEYCODE_F7)
378442   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Business Basics")    PORT_CODE(KEYCODE_F8)
379443   PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
380444
381   PORT_START("LINEC")
445   PORT_START("KEY.12")
382446   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down")   PORT_CODE(KEYCODE_DOWN)
383447   PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNUSED)
384448
385   PORT_START("LINED")
449   PORT_START("KEY.13")
386450   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right")  PORT_CODE(KEYCODE_RIGHT)
387451   PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNUSED)
388452
389   PORT_START("LINEE")
453   PORT_START("KEY.14")
390454   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left mouse button (KB)") PORT_CODE(KEYCODE_0_PAD)
391455   PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNUSED)
392456
393   PORT_START("LINEF")
457   PORT_START("KEY.15")
394458   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right mouse button (KB)")    PORT_CODE(KEYCODE_DEL_PAD)
395459   PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNUSED)
396460
397461INPUT_PORTS_END
398462
463INPUT_PORTS_START( glcolor )
464   PORT_START("CART_TYPE")
465   PORT_CONFNAME( 0x01, 0x00, "Cartridge Type" )
466   PORT_CONFSETTING( 0x00, "ROM" )
467   PORT_CONFSETTING( 0x01, "RAM" )
468
469   PORT_START("KEY.0")
470   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
471   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
472   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
473   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('^')
474   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
475   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
476   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
477   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
478
479   PORT_START("KEY.1")
480   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("Help")
481   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
482   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
483   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
484   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
485   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
486   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS)  PORT_CHAR(0x00df) PORT_CHAR('?')
487   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=')
488
489   PORT_START("KEY.2")
490   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
491   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
492   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNKNOWN)
493   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNKNOWN)
494   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
495   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
496   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
497   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
498
499   PORT_START("KEY.3")
500   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
501   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
502   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
503   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
504   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
505   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
506   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
507   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
508
509   PORT_START("KEY.4")
510   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("Spieler 1")
511   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
512   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
513   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
514   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
515   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
516   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
517   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
518
519   PORT_START("KEY.5")
520   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT))
521   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
522   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("Spielers")
523   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_NAME("Stufe")
524   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
525   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("Symbols")
526   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
527   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';')
528
529   PORT_START("KEY.6")
530   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
531   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
532   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
533   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
534   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Button 1")
535   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_NAME("Button 2")
536   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("Button 3")
537   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("Button 4")
538
539   PORT_START("KEY.7")
540   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
541
542   PORT_START("KEY.8")
543   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
544   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Backspace") PORT_CHAR(UCHAR_MAMEKEY(BACKSPACE))
545   PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN)
546
547   PORT_START("KEY.9")
548   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
549   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0x00fc) PORT_CHAR(0x00dc)
550   PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN)
551
552   PORT_START("KEY.10")
553   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
554   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(0x00e4) PORT_CHAR(0x00c4)
555   PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN)
556
557   PORT_START("KEY.11")
558   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
559   PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN)
560
561   PORT_START("KEY.12")
562   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00f6) PORT_CHAR(0x00d6)
563   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("Spieler 2")
564   PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN)
565
566   PORT_START("KEY.13")
567   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':')
568   PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN)
569
570   PORT_START("KEY.14")
571   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
572
573   PORT_START("KEY.15")
574   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
575
576INPUT_PORTS_END
577
578
399579IRQ_CALLBACK_MEMBER(prestige_state::prestige_int_ack)
400580{
401581   UINT32 vector;
402582
403583   m_maincpu->set_input_line(0, CLEAR_LINE);
404584
405   if (m_irq_counter == 0x02)
585   if (m_irq_counter == 0x04)
406586   {
407587      m_irq_counter = 0;
408588      vector = 0x0020;
r31133r31134
448628   palette.set_pen_color(1, rgb_t(16, 37, 84));
449629}
450630
451UINT32 prestige_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
631PALETTE_INIT_MEMBER(prestige_state, glcolor)
452632{
453   UINT16 addr = 0;
633   palette.set_pen_color(0, rgb_t(0x3f,0xbf,0x3f));
634   palette.set_pen_color(1, rgb_t(0xff,0x3f,0x5f));
635   palette.set_pen_color(2, rgb_t(0x1f,0x1f,0x3f));
636   palette.set_pen_color(3, rgb_t(0xff,0xdf,0x1f));
637}
454638
455   for (int y = 0; y < 100; y++)
639UINT32 prestige_state::screen_update(int bpp, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
640{
641   int width = m_lcdc.fb_width + m_lcdc.lcd_w + 1;
642
643   for (int y = 0; y <= m_lcdc.lcd_h; y++)
456644   {
457      for (int sx = 0; sx < 30; sx++)
645      int line_start;
646      if (y <= m_lcdc.split_pos)
647         line_start = m_lcdc.addr1 + y * width;
648      else
649         line_start = m_lcdc.addr2 + (y - m_lcdc.split_pos - 1) * width;
650
651      for (int sx = 0; sx <= m_lcdc.lcd_w; sx++)
458652      {
459         UINT8 data = m_vram[addr];
653         UINT8 data = m_vram[(line_start + sx) & 0x1fff];
460654
461         for (int x = 0; x < 8; x++)
655         for (int x = 0; x < 8 / bpp; x++)
462656         {
463            bitmap.pix16(y, (sx * 8) + x) = BIT(data, 7);
657            int pix = 0;
658            for (int b=0; b<bpp; b++)
659               pix |= BIT(data, 7 - b) << b;
464660
465            data <<= 1;
661            if (cliprect.contains(sx * 8 / bpp + x, y))
662               bitmap.pix16(y, sx * 8 / bpp + x) = pix;
663
664            data <<= bpp;
466665         }
467
468         addr++;
469666      }
470667   }
471668
472669   return 0;
473670}
474671
672UINT32 prestige_state::screen_update_1bpp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
673{
674   return screen_update(1, screen, bitmap, cliprect);
675}
676
677UINT32 prestige_state::screen_update_2bpp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
678{
679   return screen_update(2, screen, bitmap, cliprect);
680}
681
475682TIMER_DEVICE_CALLBACK_MEMBER(prestige_state::irq_timer)
476683{
477684   m_maincpu->set_input_line(0, ASSERT_LINE);
r31133r31134
479686
480687static MACHINE_CONFIG_START( prestige_base, prestige_state )
481688   /* basic machine hardware */
482   MCFG_CPU_ADD("maincpu",Z80, XTAL_4MHz)
689   MCFG_CPU_ADD("maincpu",Z80, XTAL_8MHz)  // Z84C008
483690   MCFG_CPU_PROGRAM_MAP(prestige_mem)
484691   MCFG_CPU_IO_MAP(prestige_io)
485692   MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(prestige_state,prestige_int_ack)
r31133r31134
490697   MCFG_SCREEN_ADD("screen", LCD)
491698   MCFG_SCREEN_REFRESH_RATE(50)
492699   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
493   MCFG_SCREEN_UPDATE_DRIVER(prestige_state, screen_update)
700   MCFG_SCREEN_UPDATE_DRIVER(prestige_state, screen_update_1bpp)
494701   MCFG_SCREEN_SIZE( 240, 100 )
495702   MCFG_SCREEN_VISIBLE_AREA( 0, 240-1, 0, 100-1 )
496703   MCFG_SCREEN_PALETTE("palette")
r31133r31134
511718   MCFG_RAM_EXTRA_OPTIONS("64K")
512719MACHINE_CONFIG_END
513720
721static MACHINE_CONFIG_DERIVED( glcolor, prestige_base )
722   MCFG_CPU_MODIFY("maincpu")
723   MCFG_CPU_IO_MAP(glcolor_io)
724
725   /* video hardware */
726   MCFG_SCREEN_MODIFY("screen")
727   MCFG_SCREEN_UPDATE_DRIVER(prestige_state, screen_update_2bpp)
728   MCFG_SCREEN_SIZE( 160, 80 )
729   MCFG_SCREEN_VISIBLE_AREA( 0, 160-1, 0, 80-1 )
730
731   MCFG_PALETTE_MODIFY("palette")
732   MCFG_PALETTE_ENTRIES(4)
733   MCFG_PALETTE_INIT_OWNER(prestige_state, glcolor)
734
735   MCFG_SOFTWARE_LIST_ADD("cart_list", "glcolor")
736MACHINE_CONFIG_END
737
514738static MACHINE_CONFIG_DERIVED( prestige, prestige_base )
515739   MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("gl6000sl_cart", "gl6000sl")
516740   MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("misterx_cart", "misterx")
r31133r31134
565789/* Driver */
566790
567791/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */
568COMP( 1994, glcolor,   0,       0,  prestige,   prestige, driver_device,     0,  "VTech",   "Genius Leader Color (Germany)",    GAME_NOT_WORKING | GAME_NO_SOUND)
792COMP( 1994, glcolor,   0,       0,  glcolor,    glcolor, driver_device,     0,  "VTech",   "Genius Leader Color (Germany)",    GAME_NOT_WORKING | GAME_NO_SOUND)
569793COMP( 1997, gl6000sl,  0,       0,  gl6000sl,   prestige, driver_device,     0,  "VTech",   "Genius Leader 6000SL (Germany)",   GAME_NOT_WORKING | GAME_NO_SOUND)
570794COMP( 1998, gl7007sl,  0,       0,  gl7007sl,   prestige, driver_device,     0,  "VTech",   "Genius Leader 7007SL (Germany)",   GAME_NOT_WORKING | GAME_NO_SOUND)
571795COMP( 1998, prestige,  0,       0,  prestige,   prestige, driver_device,     0,  "VTech",   "PreComputer Prestige Elite",       GAME_NOT_WORKING | GAME_NO_SOUND)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team