Previous 199869 Revisions Next

r20226 Saturday 12th January, 2013 at 21:54:10 UTC by Wilbert Pol
(MESS) g7400: Moved the EF9340/1 code into a separate device. Merged all the odyseey2 code into the driver file. (nw)
[src/emu]emu.mak
[src/emu/video]ef9340_1.c* ef9340_1.h* ef9341_chargen.h*
[src/mess]mess.mak
[src/mess/drivers]odyssey2.c
[src/mess/includes]odyssey2.h
[src/mess/video]ef9341_chargen.h odyssey2.c

trunk/src/emu/video/ef9340_1.c
r0r20226
1/***************************************************************************
2
3    ef9340_1.h
4
5    Thomson EF9340 + EF9341 teletext graphics chips with 1KB external
6    character ram.
7
8***************************************************************************/
9
10#include "ef9340_1.h"
11#include "ef9341_chargen.h"
12
13
14// device type definition
15const device_type EF9340_1 = &device_creator<ef9340_1_device>;
16
17
18static const UINT8 bgr2rgb[8] =
19{
20    0x00, 0x04, 0x02, 0x06, 0x01, 0x05, 0x03, 0x07
21};
22
23
24ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
25   : device_t(mconfig, EF9340_1, "EF9340+EF9341", tag, owner, clock)
26   , m_screen_tag(NULL)
27   , m_screen(NULL)
28   //, m_start_vpos(START_Y)
29   //, m_start_vblank(START_Y + SCREEN_HEIGHT)
30   //, m_screen_lines(LINES)
31{
32}
33
34
35void ef9340_1_device::device_start()
36{
37   assert( m_screen_tag != NULL );
38   m_screen = machine().device<screen_device>(m_screen_tag);
39   assert( m_screen != NULL );
40
41   // Let the screen create our temporary bitmap with the screen's dimensions
42   m_screen->register_screen_bitmap(m_tmp_bitmap);
43
44   m_line_timer = timer_alloc(TIMER_LINE);
45   m_line_timer->adjust( m_screen->time_until_pos(0, 0), 0,  m_screen->scan_period() );
46
47   // register our state
48   save_item(NAME(m_ef9341.TA));
49   save_item(NAME(m_ef9341.TB));
50   save_item(NAME(m_ef9341.busy));
51   save_item(NAME(m_ef9340.X));
52   save_item(NAME(m_ef9340.Y));
53   save_item(NAME(m_ef9340.Y0));
54   save_item(NAME(m_ef9340.R));
55   save_item(NAME(m_ef9340.M));
56   save_pointer(NAME(m_ef934x_ram_a), 1024);
57   save_pointer(NAME(m_ef934x_ram_b), 1024);
58   save_pointer(NAME(m_ef934x_ext_char_ram), 1024);
59}
60
61
62void ef9340_1_device::device_reset()
63{
64   m_ef9340.X = 0;
65   m_ef9340.Y = 0;
66   m_ef9340.Y0 = 0;
67   m_ef9340.R = 0;
68   m_ef9340.M = 0;
69   m_ef9341.TA = 0;
70   m_ef9341.TB = 0;
71   m_ef9341.busy = 0;
72}
73
74
75void ef9340_1_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
76{
77   switch ( id )
78   {
79      case TIMER_LINE:
80         ef9340_scanline(m_screen->vpos());
81         break;
82   }
83}
84
85
86UINT16 ef9340_1_device::ef9340_get_c_addr(UINT8 x, UINT8 y)
87{
88   if ( ( y & 0x18 ) == 0x18 )
89   {
90      return 0x318 | ( ( x & 0x38 ) << 2 ) | ( x & 0x07 );
91   }
92   if ( x & 0x20 )
93   {
94      return 0x300 | ( ( y & 0x07 ) << 5 ) | ( y & 0x18 ) | ( x & 0x07 );
95   }
96   return y << 5 | x;
97}
98
99
100void ef9340_1_device::ef9340_inc_c()
101{
102   m_ef9340.X++;
103   if ( m_ef9340.X >= 40 )
104   {
105      m_ef9340.Y = ( m_ef9340.Y + 1 ) % 24;
106      m_ef9340.X = 0;
107   }
108}
109
110
111UINT16 ef9340_1_device::external_chargen_address(UINT8 b, UINT8 slice)
112{
113   UINT8 cc = b & 0x7f;
114
115   if ( slice & 8 )
116   {
117      // 0 0 CCE4 CCE3 CCE2 CCE1 CCE0 CCE6 CCE5 ADR0
118      return ( ( cc << 3 ) & 0xf8 ) | ( ( cc >> 4 ) & 0x06) | ( slice & 0x01 );
119   }
120   // CCE6 CCE5 CCE4 CCE3 CCE2 CCE1 CCE0 ADR2 ADR1 ADR0
121   return  ( cc << 3 ) | ( slice & 0x07 );
122}
123
124
125void ef9340_1_device::ef9341_write( UINT8 command, UINT8 b, UINT8 data )
126{
127   logerror("ef9341 %s write, t%s, data %02X\n", command ? "command" : "data", b ? "B" : "A", data );
128
129   if ( command )
130   {
131      if ( b )
132      {
133         m_ef9341.TB = data;
134         m_ef9341.busy = 0x80;
135         switch( m_ef9341.TB & 0xE0 )
136         {
137         case 0x00:  /* Begin row */
138            m_ef9340.X = 0;
139            m_ef9340.Y = m_ef9341.TA & 0x1F;
140            break;
141         case 0x20:  /* Load Y */
142            m_ef9340.Y = m_ef9341.TA & 0x1F;
143            break;
144         case 0x40:  /* Load X */
145            m_ef9340.X = m_ef9341.TA & 0x3F;
146            break;
147         case 0x60:  /* INC C */
148            ef9340_inc_c();
149            break;
150         case 0x80:  /* Load M */
151            m_ef9340.M = m_ef9341.TA;
152            break;
153         case 0xA0:  /* Load R */
154            m_ef9340.R = m_ef9341.TA;
155            break;
156         case 0xC0:  /* Load Y0 */
157            m_ef9340.Y0 = m_ef9341.TA & 0x3F;
158            break;
159         }
160         m_ef9341.busy = 0;
161      }
162      else
163      {
164         m_ef9341.TA = data;
165      }
166   }
167   else
168   {
169      if ( b )
170      {
171         UINT16 addr = ef9340_get_c_addr( m_ef9340.X, m_ef9340.Y ) & 0x3ff;
172
173         m_ef9341.TB = data;
174         m_ef9341.busy = 0x80;
175         switch ( m_ef9340.M & 0xE0 )
176         {
177            case 0x00:  /* Write */
178               m_ef934x_ram_a[addr] = m_ef9341.TA;
179               m_ef934x_ram_b[addr] = m_ef9341.TB;
180               ef9340_inc_c();
181               break;
182
183            case 0x20:  /* Read */
184               m_ef9341.TA = m_ef934x_ram_a[addr];
185               m_ef9341.TB = m_ef934x_ram_b[addr];
186               ef9340_inc_c();
187               break;
188
189            case 0x40:  /* Write without increment */
190               m_ef934x_ram_a[addr] = m_ef9341.TA;
191               m_ef934x_ram_b[addr] = m_ef9341.TB;
192               break;
193
194            case 0x60:  /* Read without increment */
195               m_ef9341.TA = m_ef934x_ram_a[addr];
196               m_ef9341.TB = m_ef934x_ram_b[addr];
197               break;
198
199            case 0x80:  /* Write slice */
200               {
201                  UINT8 b = m_ef934x_ram_b[addr];
202                  UINT8 slice = ( m_ef9340.M & 0x0f ) % 10;
203
204                  if ( b >= 0xa0 )
205                  {
206                     m_ef934x_ext_char_ram[ external_chargen_address( b, slice ) ] = m_ef9341.TA;
207                  }
208
209                  // Increment slice number
210                  m_ef9340.M = ( m_ef9340.M & 0xf0) | ( ( slice + 1 ) % 10 );
211               }
212               break;
213
214            case 0xA0:  /* Read slice */
215               fatalerror/*logerror*/("ef9341 unimplemented data action %02X\n", m_ef9340.M & 0xE0 );
216               break;
217         }
218         m_ef9341.busy = 0;
219      }
220      else
221      {
222         m_ef9341.TA = data;
223      }
224   }
225}
226
227
228UINT8 ef9340_1_device::ef9341_read( UINT8 command, UINT8 b )
229{
230   UINT8   data = 0xFF;
231
232   logerror("ef9341 %s read, t%s\n", command ? "command" : "data", b ? "B" : "A" );
233   if ( command )
234   {
235      if ( b )
236      {
237         data = 0xFF;
238      }
239      else
240      {
241         data = m_ef9341.busy;
242      }
243   }
244   else
245   {
246      if ( b )
247      {
248         data = m_ef9341.TB;
249      }
250      else
251      {
252         data = m_ef9341.TA;
253      }
254   }
255   return data;
256}
257
258
259void ef9340_1_device::ef9340_scanline(int vpos)
260{
261   if ( vpos < 250 )
262   {
263      int y = vpos - 0;
264      int y_row, slice;
265
266      if ( y < 10 )
267      {
268         // Service row
269
270         if ( m_ef9340.R & 0x08 )
271         {
272            // Service row is enabled
273
274            y_row = 31;
275            slice = y;
276         }
277         else
278         {
279            // Service row is disabled
280
281            for ( int i = 0; i < 40 * 8; i++ )
282            {
283               m_tmp_bitmap.pix16(vpos, 0 + i ) = 24;
284            }
285            return;
286         }
287      }
288      else
289      {
290         // Displaying regular row
291         y_row = (y - 10) / 10;
292         slice = (y - 10) % 10;
293      }
294
295      for ( int x = 0; x < 40; x++ )
296      {
297         UINT16 addr = ef9340_get_c_addr( x, y_row );
298         UINT8 a = m_ef934x_ram_a[addr];
299         UINT8 b = m_ef934x_ram_b[addr];
300         UINT8 fg = 0;
301         UINT8 bg = 0;
302         UINT8 char_data = 0x00;
303
304         if ( a & 0x80 )
305         {
306            // Graphics
307         }
308         else
309         {
310            // Alphannumeric
311            if ( b & 0x80 )
312            {
313               // Special (DEL or Extension)
314            }
315            else
316            {
317               // Normal
318               char_data = ef9341_char_set[0][b & 0x7f][slice];
319               fg = bgr2rgb[ a & 0x07 ];
320            }
321         }
322
323         for ( int i = 0; i < 8; i++ )
324         {
325            m_tmp_bitmap.pix16(vpos, 0 + x*8 + i ) = (char_data & 0x80) ? fg : bg;
326            char_data <<= 1;
327         }
328      }
329   }
330}
331
trunk/src/emu/video/ef9340_1.h
r0r20226
1/***************************************************************************
2
3    ef9340_1.h
4
5    Thomson EF9340 + EF9341 teletext graphics chips with 1KB external
6    character ram.
7
8***************************************************************************/
9
10#pragma once
11
12#ifndef __EF9340_1_H__
13#define __EF9340_1_H__
14
15#include "emu.h"
16
17
18#define MCFG_EF9340_1_ADD(_tag, _clock, _screen_tag) \
19   MCFG_DEVICE_ADD(_tag, EF9340_1, _clock) \
20   ef9340_1_device::set_screen_tag(*device, _screen_tag); \
21
22
23class ef9340_1_device : public device_t
24{
25public:
26    // construction/destruction
27    ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
28
29   // static configuration helpers
30   static void set_screen_tag(device_t &device, const char *screen_tag) { downcast<ef9340_1_device &>(device).m_screen_tag = screen_tag; }
31
32   inline bitmap_ind16 *get_bitmap() { return &m_tmp_bitmap; }
33
34   void ef9341_write( UINT8 command, UINT8 b, UINT8 data );
35   UINT8 ef9341_read( UINT8 command, UINT8 b );
36
37protected:
38   // device-level overrides
39   virtual void device_start();
40   virtual void device_reset();
41   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
42
43   inline UINT16 ef9340_get_c_addr(UINT8 x, UINT8 y);
44   inline void ef9340_inc_c();
45
46   // Calculate the external chargen address for a character and slice
47   inline UINT16 external_chargen_address(UINT8 b, UINT8 slice);
48
49   void ef9340_scanline(int vpos);
50
51   /* timers */
52   static const device_timer_id TIMER_LINE = 0;
53
54   emu_timer *m_line_timer;
55
56   const char *m_screen_tag;
57   screen_device *m_screen;
58
59   bitmap_ind16 m_tmp_bitmap;
60
61   struct
62   {
63      UINT8   TA;
64      UINT8   TB;
65      UINT8   busy;
66   } m_ef9341;
67   struct
68   {
69      UINT8   X;
70      UINT8   Y;
71      UINT8   Y0;
72      UINT8   R;
73      UINT8   M;
74   } m_ef9340;
75   UINT8   m_ef934x_ram_a[1024];
76   UINT8   m_ef934x_ram_b[1024];
77   UINT8   m_ef934x_ext_char_ram[1024];
78};
79
80
81// device type definition
82extern const device_type EF9340_1;
83
84#endif  /* __EF9340_1_H__ */
85
trunk/src/emu/video/ef9341_chargen.h
r0r20226
1static const UINT8 ef9341_char_set[2][128][10] = {
2   // Alphanumeric character set (128 characters)
3   {
4      { 0x00,0x38,0x44,0x40,0x20,0x10,0x00,0x10,0x00,0x00 },
5      { 0x00,0x10,0x28,0x00,0x38,0x44,0x7c,0x44,0x00,0x00 },
6      { 0x00,0x08,0x10,0x3c,0x20,0x30,0x20,0x3c,0x00,0x00 },
7      { 0x00,0x08,0x14,0x10,0x38,0x10,0x24,0x3c,0x00,0x00 },
8      { 0x00,0x10,0x38,0x50,0x38,0x14,0x54,0x38,0x10,0x00 },
9      { 0x00,0x38,0x44,0x40,0x40,0x40,0x44,0x38,0x10,0x20 },
10      { 0x00,0x28,0x28,0x7c,0x28,0x7c,0x28,0x28,0x00,0x00 },
11      { 0x00,0x20,0x18,0x00,0x38,0x44,0x7c,0x44,0x00,0x00 },
12      { 0x00,0x20,0x18,0x00,0x44,0x44,0x44,0x38,0x00,0x00 },
13      { 0x00,0x10,0x08,0x3c,0x20,0x30,0x20,0x3c,0x00,0x00 },
14      { 0x00,0x3c,0x50,0x50,0x58,0x50,0x50,0x3c,0x00,0x00 },
15      { 0x00,0x08,0x14,0x3c,0x20,0x30,0x20,0x3c,0x00,0x00 },
16      { 0x00,0x00,0x10,0x20,0x7f,0x20,0x10,0x00,0x00,0x00 },
17      { 0x00,0x10,0x38,0x54,0x10,0x10,0x10,0x10,0x10,0x10 },
18      { 0x00,0x00,0x08,0x04,0xfe,0x04,0x08,0x00,0x00,0x00 },
19      { 0x10,0x10,0x10,0x10,0x10,0x10,0x54,0x38,0x10,0x00 },
20      { 0x00,0x18,0x24,0x18,0x00,0x00,0x00,0x00,0x00,0x00 },
21      { 0x00,0x10,0x10,0x7c,0x10,0x10,0x00,0x7c,0x00,0x00 },
22      { 0x00,0x08,0x10,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
23      { 0x00,0x28,0x00,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
24      { 0x00,0x28,0x00,0x30,0x10,0x10,0x10,0x38,0x00,0x00 },
25      { 0x00,0x00,0x00,0x38,0x40,0x40,0x40,0x38,0x10,0x20 },
26      { 0x00,0x10,0x28,0x00,0x44,0x44,0x4c,0x34,0x00,0x00 },
27      { 0x00,0x20,0x10,0x34,0x4c,0x44,0x4c,0x34,0x00,0x00 },
28      { 0x00,0x00,0x10,0x00,0x7c,0x00,0x10,0x00,0x00,0x00 },
29      { 0x00,0x20,0x10,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
30      { 0x00,0x00,0x00,0x3c,0x52,0x5e,0x50,0x3e,0x00,0x00 },
31      { 0x00,0x10,0x28,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
32      { 0x00,0x40,0xc0,0x40,0x44,0x4c,0x14,0x3e,0x04,0x00 },
33      { 0x00,0x40,0xc0,0x40,0x4c,0x52,0x04,0x08,0x1e,0x00 },
34      { 0x00,0xe0,0x20,0x40,0x24,0xcc,0x14,0x3e,0x04,0x00 },
35      { 0x00,0x10,0x28,0x00,0x38,0x44,0x44,0x38,0x00,0x00 },
36      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
37      { 0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x10,0x00,0x00 },
38      { 0x00,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00 },
39      { 0x00,0x28,0x00,0x3c,0x20,0x30,0x20,0x3c,0x00,0x00 },
40      { 0x00,0x10,0x28,0x34,0x4c,0x44,0x4c,0x34,0x00,0x00 },
41      { 0x00,0x60,0x64,0x08,0x10,0x20,0x4c,0x0c,0x00,0x00 },
42      { 0x00,0x20,0x50,0x50,0x20,0x54,0x48,0x34,0x00,0x00 },
43      { 0x00,0x10,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
44      { 0x00,0x08,0x10,0x20,0x20,0x20,0x10,0x08,0x00,0x00 },
45      { 0x00,0x20,0x10,0x08,0x08,0x08,0x10,0x20,0x00,0x00 },
46      { 0x00,0x10,0x54,0x38,0x10,0x38,0x54,0x10,0x00,0x00 },
47      { 0x00,0x00,0x10,0x10,0x7c,0x10,0x10,0x00,0x00,0x00 },
48      { 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x40,0x00 },
49      { 0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00 },
50      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00 },
51      { 0x01,0x02,0x02,0x04,0x08,0x10,0x20,0x20,0x40,0x80 },
52      { 0x00,0x10,0x28,0x44,0x44,0x44,0x28,0x10,0x00,0x00 },
53      { 0x00,0x10,0x30,0x10,0x10,0x10,0x10,0x10,0x00,0x00 },
54      { 0x00,0x38,0x44,0x04,0x18,0x20,0x40,0x7c,0x00,0x00 },
55      { 0x00,0x7c,0x04,0x08,0x18,0x04,0x44,0x38,0x00,0x00 },
56      { 0x00,0x08,0x18,0x28,0x48,0x7c,0x08,0x08,0x00,0x00 },
57      { 0x00,0x7c,0x40,0x78,0x04,0x04,0x44,0x38,0x00,0x00 },
58      { 0x00,0x18,0x20,0x40,0x78,0x44,0x44,0x38,0x00,0x00 },
59      { 0x00,0x7c,0x04,0x08,0x10,0x20,0x20,0x20,0x00,0x00 },
60      { 0x00,0x38,0x44,0x44,0x38,0x44,0x44,0x38,0x00,0x00 },
61      { 0x00,0x38,0x44,0x44,0x3c,0x04,0x04,0x38,0x00,0x00 },
62      { 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00 },
63      { 0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x20,0x40,0x00 },
64      { 0x00,0x04,0x08,0x10,0x20,0x10,0x08,0x04,0x00,0x00 },
65      { 0x00,0x00,0x00,0x7c,0x00,0x7c,0x00,0x00,0x00,0x00 },
66      { 0x00,0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00,0x00 },
67      { 0x00,0x38,0x44,0x04,0x08,0x10,0x00,0x10,0x00,0x00 },
68      { 0x00,0x38,0x44,0x5c,0x54,0x5c,0x40,0x38,0x00,0x00 },
69      { 0x00,0x38,0x44,0x44,0x44,0x7c,0x44,0x44,0x00,0x00 },
70      { 0x00,0x78,0x44,0x44,0x78,0x44,0x44,0x78,0x00,0x00 },
71      { 0x00,0x38,0x44,0x40,0x40,0x40,0x44,0x38,0x00,0x00 },
72      { 0x00,0x78,0x44,0x44,0x44,0x44,0x44,0x78,0x00,0x00 },
73      { 0x00,0x7c,0x40,0x40,0x70,0x40,0x40,0x7c,0x00,0x00 },
74      { 0x00,0x7c,0x40,0x40,0x70,0x40,0x40,0x40,0x00,0x00 },
75      { 0x00,0x38,0x44,0x40,0x40,0x4c,0x44,0x3c,0x00,0x00 },
76      { 0x00,0x44,0x44,0x44,0x7c,0x44,0x44,0x44,0x00,0x00 },
77      { 0x00,0x38,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00 },
78      { 0x00,0x1c,0x08,0x08,0x08,0x08,0x48,0x30,0x00,0x00 },
79      { 0x00,0x44,0x48,0x50,0x60,0x50,0x48,0x44,0x00,0x00 },
80      { 0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x7c,0x00,0x00 },
81      { 0x00,0x44,0x6c,0x54,0x44,0x44,0x44,0x44,0x00,0x00 },
82      { 0x00,0x44,0x44,0x64,0x54,0x4c,0x44,0x44,0x00,0x00 },
83      { 0x00,0x38,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00 },
84      { 0x00,0x78,0x44,0x44,0x78,0x40,0x40,0x40,0x00,0x00 },
85      { 0x00,0x38,0x44,0x44,0x44,0x54,0x48,0x34,0x00,0x00 },
86      { 0x00,0x78,0x44,0x44,0x78,0x50,0x48,0x44,0x00,0x00 },
87      { 0x00,0x38,0x44,0x40,0x38,0x04,0x44,0x38,0x00,0x00 },
88      { 0x00,0x7c,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00 },
89      { 0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00 },
90      { 0x00,0x44,0x44,0x44,0x28,0x28,0x10,0x10,0x00,0x00 },
91      { 0x00,0x44,0x44,0x44,0x54,0x54,0x54,0x28,0x00,0x00 },
92      { 0x00,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x00,0x00 },
93      { 0x00,0x44,0x44,0x28,0x10,0x10,0x10,0x10,0x00,0x00 },
94      { 0x00,0x7c,0x04,0x08,0x10,0x20,0x40,0x7c,0x00,0x00 },
95      { 0x00,0x1c,0x10,0x10,0x10,0x10,0x10,0x1c,0x00,0x00 },
96      { 0x80,0x40,0x40,0x20,0x10,0x08,0x04,0x04,0x02,0x01 },
97      { 0x00,0x38,0x08,0x08,0x08,0x08,0x08,0x38,0x00,0x00 },
98      { 0x00,0x10,0x28,0x00,0x30,0x10,0x10,0x38,0x00,0x00 },
99      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff },
100      { 0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00 },
101      { 0x00,0x00,0x00,0x34,0x4c,0x44,0x4c,0x34,0x00,0x00 },
102      { 0x00,0x40,0x40,0x78,0x44,0x44,0x44,0x78,0x00,0x00 },
103      { 0x00,0x00,0x00,0x38,0x40,0x40,0x40,0x38,0x00,0x00 },
104      { 0x00,0x04,0x04,0x3c,0x44,0x44,0x44,0x3c,0x00,0x00 },
105      { 0x00,0x00,0x00,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
106      { 0x00,0x18,0x24,0x20,0x70,0x20,0x20,0x20,0x00,0x00 },
107      { 0x00,0x00,0x00,0x3c,0x44,0x44,0x3c,0x04,0x24,0x18 },
108      { 0x00,0x40,0x40,0x58,0x64,0x44,0x44,0x44,0x00,0x00 },
109      { 0x00,0x10,0x00,0x30,0x10,0x10,0x10,0x38,0x00,0x00 },
110      { 0x00,0x08,0x00,0x18,0x08,0x08,0x08,0x08,0x48,0x30 },
111      { 0x00,0x20,0x20,0x24,0x28,0x30,0x28,0x24,0x00,0x00 },
112      { 0x00,0x30,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00 },
113      { 0x00,0x00,0x00,0x68,0x54,0x54,0x54,0x54,0x00,0x00 },
114      { 0x00,0x00,0x00,0x58,0x64,0x44,0x44,0x44,0x00,0x00 },
115      { 0x00,0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00,0x00 },
116      { 0x00,0x00,0x00,0x78,0x44,0x44,0x44,0x78,0x40,0x40 },
117      { 0x00,0x00,0x00,0x3c,0x44,0x44,0x44,0x3c,0x04,0x04 },
118      { 0x00,0x00,0x00,0x58,0x64,0x40,0x40,0x40,0x00,0x00 },
119      { 0x00,0x00,0x00,0x38,0x40,0x38,0x04,0x78,0x00,0x00 },
120      { 0x00,0x20,0x20,0x38,0x20,0x20,0x20,0x18,0x00,0x00 },
121      { 0x00,0x00,0x00,0x44,0x44,0x44,0x4c,0x34,0x00,0x00 },
122      { 0x00,0x00,0x00,0x44,0x44,0x28,0x28,0x10,0x00,0x00 },
123      { 0x00,0x00,0x00,0x44,0x44,0x54,0x54,0x28,0x00,0x00 },
124      { 0x00,0x00,0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00 },
125      { 0x00,0x00,0x00,0x44,0x44,0x4c,0x34,0x04,0x44,0x38 },
126      { 0x00,0x00,0x00,0x7c,0x08,0x10,0x20,0x7c,0x00,0x00 },
127      { 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 },
128      { 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10 },
129      { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 },
130      { 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
131      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }
132   },
133
134   {
135      // Separated semi-graphic character set (64 characters)
136      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
137      { 0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
138      { 0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
139      { 0x77,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
140      { 0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00 },
141      { 0x70,0x70,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00 },
142      { 0x07,0x07,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00 },
143      { 0x77,0x77,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00 },
144      { 0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00 },
145      { 0x70,0x70,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00 },
146      { 0x07,0x07,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00 },
147      { 0x77,0x77,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00 },
148      { 0x00,0x00,0x00,0x77,0x77,0x77,0x00,0x00,0x00,0x00 },
149      { 0x70,0x70,0x00,0x77,0x77,0x77,0x00,0x00,0x00,0x00 },
150      { 0x07,0x07,0x00,0x77,0x77,0x77,0x00,0x00,0x00,0x00 },
151      { 0x77,0x77,0x00,0x77,0x77,0x77,0x00,0x00,0x00,0x00 },
152      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x00 },
153      { 0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x00 },
154      { 0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x00 },
155      { 0x77,0x77,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x00 },
156      { 0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x70,0x70,0x00 },
157      { 0x70,0x70,0x00,0x70,0x70,0x70,0x00,0x70,0x70,0x00 },
158      { 0x07,0x07,0x00,0x70,0x70,0x70,0x00,0x70,0x70,0x00 },
159      { 0x77,0x77,0x00,0x70,0x70,0x70,0x00,0x70,0x70,0x00 },
160      { 0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x70,0x70,0x00 },
161      { 0x70,0x70,0x00,0x07,0x07,0x07,0x00,0x70,0x70,0x00 },
162      { 0x07,0x07,0x00,0x07,0x07,0x07,0x00,0x70,0x70,0x00 },
163      { 0x77,0x77,0x00,0x07,0x07,0x07,0x00,0x70,0x70,0x00 },
164      { 0x00,0x00,0x00,0x77,0x77,0x77,0x00,0x70,0x70,0x00 },
165      { 0x70,0x70,0x00,0x77,0x77,0x77,0x00,0x70,0x70,0x00 },
166      { 0x07,0x07,0x00,0x77,0x77,0x77,0x00,0x70,0x70,0x00 },
167      { 0x77,0x77,0x00,0x77,0x77,0x77,0x00,0x70,0x70,0x00 },
168      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00 },
169      { 0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00 },
170      { 0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00 },
171      { 0x77,0x77,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00 },
172      { 0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x07,0x07,0x00 },
173      { 0x70,0x70,0x00,0x70,0x70,0x70,0x00,0x07,0x07,0x00 },
174      { 0x07,0x07,0x00,0x70,0x70,0x70,0x00,0x07,0x07,0x00 },
175      { 0x77,0x77,0x00,0x70,0x70,0x70,0x00,0x07,0x07,0x00 },
176      { 0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x07,0x07,0x00 },
177      { 0x70,0x70,0x00,0x07,0x07,0x07,0x00,0x07,0x07,0x00 },
178      { 0x07,0x07,0x00,0x07,0x07,0x07,0x00,0x07,0x07,0x00 },
179      { 0x77,0x77,0x00,0x07,0x07,0x07,0x00,0x07,0x07,0x00 },
180      { 0x00,0x00,0x00,0x77,0x77,0x77,0x00,0x07,0x07,0x00 },
181      { 0x70,0x70,0x00,0x77,0x77,0x77,0x00,0x07,0x07,0x00 },
182      { 0x07,0x07,0x00,0x77,0x77,0x77,0x00,0x07,0x07,0x00 },
183      { 0x77,0x77,0x00,0x77,0x77,0x77,0x00,0x07,0x07,0x00 },
184      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x00 },
185      { 0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x00 },
186      { 0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x00 },
187      { 0x77,0x77,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x00 },
188      { 0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x77,0x77,0x00 },
189      { 0x70,0x70,0x00,0x70,0x70,0x70,0x00,0x77,0x77,0x00 },
190      { 0x07,0x07,0x00,0x70,0x70,0x70,0x00,0x77,0x77,0x00 },
191      { 0x77,0x77,0x00,0x70,0x70,0x70,0x00,0x77,0x77,0x00 },
192      { 0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x77,0x77,0x00 },
193      { 0x70,0x70,0x00,0x07,0x07,0x07,0x00,0x77,0x77,0x00 },
194      { 0x07,0x07,0x00,0x07,0x07,0x07,0x00,0x77,0x77,0x00 },
195      { 0x77,0x77,0x00,0x07,0x07,0x07,0x00,0x77,0x77,0x00 },
196      { 0x00,0x00,0x00,0x77,0x77,0x77,0x00,0x77,0x77,0x00 },
197      { 0x70,0x70,0x00,0x77,0x77,0x77,0x00,0x77,0x77,0x00 },
198      { 0x07,0x07,0x00,0x77,0x77,0x77,0x00,0x77,0x77,0x00 },
199      { 0x77,0x77,0x00,0x77,0x77,0x77,0x00,0x77,0x77,0x00 },
200
201      // Mosaic semi-graphic character set (64 characters)
202      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
203      { 0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
204      { 0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
205      { 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
206      { 0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00 },
207      { 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00 },
208      { 0x0f,0x0f,0x0f,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00 },
209      { 0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00 },
210      { 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00 },
211      { 0xf0,0xf0,0xf0,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00 },
212      { 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00 },
213      { 0xff,0xff,0xff,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00 },
214      { 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00 },
215      { 0xf0,0xf0,0xf0,0xff,0xff,0xff,0xff,0x00,0x00,0x00 },
216      { 0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0x00,0x00,0x00 },
217      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00 },
218      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0 },
219      { 0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0 },
220      { 0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0 },
221      { 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0 },
222      { 0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0 },
223      { 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0 },
224      { 0x0f,0x0f,0x0f,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0 },
225      { 0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0 },
226      { 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0xf0,0xf0,0xf0 },
227      { 0xf0,0xf0,0xf0,0x0f,0x0f,0x0f,0x0f,0xf0,0xf0,0xf0 },
228      { 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0xf0,0xf0,0xf0 },
229      { 0xff,0xff,0xff,0x0f,0x0f,0x0f,0x0f,0xf0,0xf0,0xf0 },
230      { 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0 },
231      { 0xf0,0xf0,0xf0,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0 },
232      { 0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0 },
233      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0 },
234      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f },
235      { 0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f },
236      { 0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f },
237      { 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f },
238      { 0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0x0f,0x0f,0x0f },
239      { 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x0f,0x0f,0x0f },
240      { 0x0f,0x0f,0x0f,0xf0,0xf0,0xf0,0xf0,0x0f,0x0f,0x0f },
241      { 0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0x0f,0x0f,0x0f },
242      { 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f },
243      { 0xf0,0xf0,0xf0,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f },
244      { 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f },
245      { 0xff,0xff,0xff,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f },
246      { 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x0f,0x0f,0x0f },
247      { 0xf0,0xf0,0xf0,0xff,0xff,0xff,0xff,0x0f,0x0f,0x0f },
248      { 0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0x0f,0x0f,0x0f },
249      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x0f,0x0f },
250      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff },
251      { 0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0xff,0xff,0xff },
252      { 0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0xff,0xff,0xff },
253      { 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff },
254      { 0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0xff,0xff,0xff },
255      { 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xff,0xff,0xff },
256      { 0x0f,0x0f,0x0f,0xf0,0xf0,0xf0,0xf0,0xff,0xff,0xff },
257      { 0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0xff,0xff,0xff },
258      { 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0xff,0xff,0xff },
259      { 0xf0,0xf0,0xf0,0x0f,0x0f,0x0f,0x0f,0xff,0xff,0xff },
260      { 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0xff,0xff,0xff },
261      { 0xff,0xff,0xff,0x0f,0x0f,0x0f,0x0f,0xff,0xff,0xff },
262      { 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
263      { 0xf0,0xf0,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
264      { 0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
265      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }
266   }
267};
trunk/src/emu/emu.mak
r20225r20226
298298   $(EMUVIDEO)/crt9021.o       \
299299   $(EMUVIDEO)/crt9212.o       \
300300   $(EMUVIDEO)/dm9368.o        \
301   $(EMUVIDEO)/ef9340_1.o      \
301302   $(EMUVIDEO)/generic.o       \
302303   $(EMUVIDEO)/h63484.o        \
303304   $(EMUVIDEO)/hd44102.o       \
trunk/src/mess/drivers/odyssey2.c
r20225r20226
99
1010  TODO:
1111  - Reimplement the cartridge slot, and thus also the voice, as a slot device
12  - In case any more machines (TVs?) turn up using the EF9340 and/or EF9341,
13    reimplement as a real device.
1412
1513***************************************************************************/
1614
1715#include "emu.h"
1816#include "cpu/mcs48/mcs48.h"
19#include "includes/odyssey2.h"
2017#include "imagedev/cartslot.h"
2118#include "sound/sp0256.h"
2219#include "video/i8244.h"
20#include "machine/i8243.h"
21#include "video/ef9340_1.h"
2322
2423
24class odyssey2_state : public driver_device
25{
26public:
27   odyssey2_state(const machine_config &mconfig, device_type type, const char *tag)
28      : driver_device(mconfig, type, tag)
29      , m_maincpu(*this, "maincpu")
30      , m_screen(*this, "screen")
31      , m_i8243(*this, "i8243")
32      , m_i8244(*this, "i8244")
33      , m_ef9340_1(*this, "ef9340_1")
34      { }
35
36   required_device<cpu_device> m_maincpu;
37   required_device<screen_device> m_screen;
38   optional_device<i8243_device> m_i8243;
39   required_device<i8244_device> m_i8244;
40   optional_device<ef9340_1_device> m_ef9340_1;
41
42   int m_the_voice_lrq_state;
43   UINT8 *m_ram;
44   UINT8 m_p1;
45   UINT8 m_p2;
46   size_t m_cart_size;
47   UINT8 m_lum;
48   DECLARE_READ8_MEMBER(t0_read);
49   DECLARE_READ8_MEMBER(io_read);
50   DECLARE_WRITE8_MEMBER(io_write);
51   DECLARE_READ8_MEMBER(bus_read);
52   DECLARE_WRITE8_MEMBER(bus_write);
53   DECLARE_READ8_MEMBER(g7400_io_read);
54   DECLARE_WRITE8_MEMBER(g7400_io_write);
55   DECLARE_READ8_MEMBER(p1_read);
56   DECLARE_WRITE8_MEMBER(p1_write);
57   DECLARE_READ8_MEMBER(p2_read);
58   DECLARE_WRITE8_MEMBER(p2_write);
59   DECLARE_READ8_MEMBER(t1_read);
60   DECLARE_DRIVER_INIT(odyssey2);
61   virtual void machine_reset();
62   virtual void palette_init();
63   UINT32 screen_update_odyssey2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
64   DECLARE_WRITE_LINE_MEMBER(the_voice_lrq_callback);
65   DECLARE_WRITE8_MEMBER(i8243_port_w);
66   DECLARE_WRITE_LINE_MEMBER(irq_callback);
67
68   DECLARE_WRITE16_MEMBER(scanline_postprocess);
69   DECLARE_WRITE16_MEMBER(scanline_postprocess_g7400);
70
71protected:
72   /* constants */
73   static const UINT8 P1_BANK_LO_BIT          = 0x01;
74   static const UINT8 P1_BANK_HI_BIT          = 0x02;
75   static const UINT8 P1_KEYBOARD_SCAN_ENABLE = 0x04; /* active low */
76   static const UINT8 P1_VDC_ENABLE           = 0x08; /* active low */
77   static const UINT8 P1_EXT_RAM_ENABLE       = 0x10; /* active low */
78   static const UINT8 P1_VDC_COPY_MODE_ENABLE = 0x40;
79   static const UINT8 P2_KEYBOARD_SELECT_MASK = 0x07; /* select row to scan */
80
81   UINT8   m_g7400_ic674_decode[8];
82   UINT8   m_g7400_ic678_decode[8];
83
84   void switch_banks();
85};
86
87
2588static ADDRESS_MAP_START( odyssey2_mem , AS_PROGRAM, 8, odyssey2_state )
2689   AM_RANGE(0x0000, 0x03FF) AM_ROM
2790   AM_RANGE(0x0400, 0x0BFF) AM_RAMBANK("bank1")
r20225r20226
263326}
264327
265328
266void odyssey2_state::machine_start()
267{
268   save_item(NAME(m_ef934x_ram_a));
269   save_item(NAME(m_ef934x_ram_b));
270   save_item(NAME(m_ef9340.X));
271   save_item(NAME(m_ef9340.Y));
272   save_item(NAME(m_ef9340.Y0));
273   save_item(NAME(m_ef9340.R));
274   save_item(NAME(m_ef9340.M));
275   save_item(NAME(m_ef9341.TA));
276   save_item(NAME(m_ef9341.TB));
277   save_item(NAME(m_ef9341.busy));
278   save_item(NAME(m_ef934x_ext_char_ram));
279}
280
281
282329void odyssey2_state::machine_reset()
283330{
284331   m_lum = 0;
r20225r20226
349396   }
350397   else
351398   {
352      return ef9341_r( offset & 0x02, offset & 0x01 );
399      return m_ef9340_1->ef9341_read( offset & 0x02, offset & 0x01 );
353400   }
354401
355402   return 0;
r20225r20226
368415   }
369416   else
370417   {
371      ef9341_w( offset & 0x02, offset & 0x01, data );
418      m_ef9340_1->ef9341_write( offset & 0x02, offset & 0x01, data );
372419   }
373420}
374421
r20225r20226
386433}
387434
388435
436WRITE16_MEMBER(odyssey2_state::scanline_postprocess_g7400)
437{
438   int vpos = data;
439   bitmap_ind16 *bitmap = m_i8244->get_bitmap();
440
441   // apply external LUM setting
442   for ( int x = i8244_device::START_ACTIVE_SCAN; x < i8244_device::END_ACTIVE_SCAN; x++ )
443   {
444      bitmap->pix16( vpos, x ) |= ( m_lum ^ 0x08 );
445   }
446}
447
389448UINT32 odyssey2_state::screen_update_odyssey2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
390449{
391450   return m_i8244->screen_update(screen, bitmap, cliprect);
r20225r20226
667726   MCFG_SCREEN_RAW_PARAMS( 3540000*2, i8244_device::LINE_CLOCKS, i8244_device::START_ACTIVE_SCAN, i8244_device::END_ACTIVE_SCAN, i8245_device::LINES, i8244_device::START_Y, i8244_device::START_Y + i8244_device::SCREEN_HEIGHT )
668727   MCFG_SCREEN_UPDATE_DRIVER(odyssey2_state, screen_update_odyssey2)
669728
670   MCFG_VIDEO_START_OVERRIDE(odyssey2_state,g7400)
671
672729   MCFG_GFXDECODE( odyssey2 )
673730   MCFG_PALETTE_LENGTH(32)
674731
675732   MCFG_I8243_ADD( "i8243", NOOP, WRITE8(odyssey2_state,i8243_port_w))
676733
734   MCFG_EF9340_1_ADD( "ef9340_1", 3540000, "screen" )
735
677736   MCFG_SPEAKER_STANDARD_MONO("mono")
678   MCFG_I8245_ADD( "i8244", 3540000, "screen", WRITELINE( odyssey2_state, irq_callback ), WRITE16( odyssey2_state, scanline_postprocess ) )
737   MCFG_I8245_ADD( "i8244", 3540000, "screen", WRITELINE( odyssey2_state, irq_callback ), WRITE16( odyssey2_state, scanline_postprocess_g7400 ) )
679738   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
680739
681740   MCFG_FRAGMENT_ADD(odyssey2_cartslot)
trunk/src/mess/mess.mak
r20225r20226
13021302   $(MESS_MACHINE)/s1410.o     \
13031303
13041304$(MESSOBJ)/magnavox.a:          \
1305   $(MESS_VIDEO)/odyssey2.o    \
13061305   $(MESS_DRIVERS)/odyssey2.o  \
13071306
13081307$(MESSOBJ)/mattel.a:            \
trunk/src/mess/includes/odyssey2.h
r20225r20226
1/*****************************************************************************
2 *
3 * includes/odyssey2.h
4 *
5 ****************************************************************************/
6
7#ifndef ODYSSEY2_H_
8#define ODYSSEY2_H_
9
10#include "machine/i8243.h"
11#include "video/i8244.h"
12
13
14struct ef9341_t
15{
16   UINT8   TA;
17   UINT8   TB;
18   UINT8   busy;
19};
20
21struct ef9340_t
22{
23   UINT8   X;
24   UINT8   Y;
25   UINT8   Y0;
26   UINT8   R;
27   UINT8   M;
28};
29
30class odyssey2_state : public driver_device
31{
32public:
33   odyssey2_state(const machine_config &mconfig, device_type type, const char *tag)
34      : driver_device(mconfig, type, tag)
35      , m_maincpu(*this, "maincpu")
36      , m_screen(*this, "screen")
37      , m_i8243(*this, "i8243")
38      , m_i8244(*this, "i8244")
39      , m_g7400(false)
40      { }
41
42   required_device<cpu_device> m_maincpu;
43   required_device<screen_device> m_screen;
44   optional_device<i8243_device> m_i8243;
45   required_device<i8244_device> m_i8244;
46
47   int m_the_voice_lrq_state;
48   UINT8 *m_ram;
49   UINT8 m_p1;
50   UINT8 m_p2;
51   size_t m_cart_size;
52   bitmap_ind16 m_tmp_bitmap;
53   int m_start_vpos;
54   int m_start_vblank;
55   UINT8 m_lum;
56   DECLARE_READ8_MEMBER(t0_read);
57   DECLARE_READ8_MEMBER(io_read);
58   DECLARE_WRITE8_MEMBER(io_write);
59   DECLARE_READ8_MEMBER(bus_read);
60   DECLARE_WRITE8_MEMBER(bus_write);
61   DECLARE_READ8_MEMBER(g7400_io_read);
62   DECLARE_WRITE8_MEMBER(g7400_io_write);
63   DECLARE_READ8_MEMBER(p1_read);
64   DECLARE_WRITE8_MEMBER(p1_write);
65   DECLARE_READ8_MEMBER(p2_read);
66   DECLARE_WRITE8_MEMBER(p2_write);
67   DECLARE_READ8_MEMBER(t1_read);
68   DECLARE_DRIVER_INIT(odyssey2);
69   virtual void machine_start();
70   virtual void machine_reset();
71   virtual void video_start();
72   void video_start_g7400();
73   virtual void palette_init();
74   UINT32 screen_update_odyssey2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
75   DECLARE_WRITE_LINE_MEMBER(the_voice_lrq_callback);
76   DECLARE_WRITE8_MEMBER(i8243_port_w);
77   DECLARE_WRITE_LINE_MEMBER(irq_callback);
78
79   void ef9341_w( UINT8 command, UINT8 b, UINT8 data );
80   UINT8 ef9341_r( UINT8 command, UINT8 b );
81
82   DECLARE_WRITE16_MEMBER(scanline_postprocess);
83
84protected:
85   /* constants */
86   static const UINT8 P1_BANK_LO_BIT          = 0x01;
87   static const UINT8 P1_BANK_HI_BIT          = 0x02;
88   static const UINT8 P1_KEYBOARD_SCAN_ENABLE = 0x04; /* active low */
89   static const UINT8 P1_VDC_ENABLE           = 0x08; /* active low */
90   static const UINT8 P1_EXT_RAM_ENABLE       = 0x10; /* active low */
91   static const UINT8 P1_VDC_COPY_MODE_ENABLE = 0x40;
92   static const UINT8 P2_KEYBOARD_SELECT_MASK = 0x07; /* select row to scan */
93
94   ef9340_t m_ef9340;
95   ef9341_t m_ef9341;
96   UINT8   m_ef934x_ram_a[1024];
97   UINT8   m_ef934x_ram_b[1024];
98   UINT8   m_ef934x_ext_char_ram[1024];
99   bool    m_g7400;
100   UINT8   m_g7400_ic674_decode[8];
101   UINT8   m_g7400_ic678_decode[8];
102
103   inline UINT16 ef9340_get_c_addr(UINT8 x, UINT8 y);
104   inline void ef9340_inc_c();
105   // Calculate the external chargen address for a character and slice
106   inline UINT16 external_chargen_address(UINT8 b, UINT8 slice);
107
108   void ef9340_scanline(int vpos);
109
110   /* timers */
111   static const device_timer_id TIMER_LINE = 0;
112   static const device_timer_id TIMER_HBLANK = 1;
113
114   emu_timer *m_line_timer;
115   emu_timer *m_hblank_timer;
116
117   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
118
119   void switch_banks();
120};
121
122#endif /* ODYSSEY2_H_ */
trunk/src/mess/video/odyssey2.c
r20225r20226
1/***************************************************************************
2
3  video/odyssey2.c
4
5  2012-02-04 DanBoris
6    - Changed color of background grid color 0 to match sprite color 0 (Fixes KTAA title screen)
7    - Fixed Odyssey2_video_w so that m_o2_vdc.reg[] is always updated (Fixes Blockout)
8    - Changed quad character generation so character height is always taken from 4th character (KTAA level 2)
9
10
11***************************************************************************/
12
13#include "emu.h"
14#include "includes/odyssey2.h"
15#include "video/ef9341_chargen.h"
16
17
18#define I824X_START_ACTIVE_SCAN         6
19#define I824X_END_ACTIVE_SCAN           (6 + 160)
20#define I824X_START_Y                   1
21#define I824X_SCREEN_HEIGHT             243
22#define I824X_LINE_CLOCKS               228
23
24
25void odyssey2_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
26{
27   int vpos = m_screen->vpos();
28
29   switch ( id )
30   {
31      case TIMER_LINE:
32         if ( m_g7400 )
33         {
34            ef9340_scanline(vpos);
35         }
36         break;
37
38      case TIMER_HBLANK:
39         break;
40   }
41}
42
43
44/***************************************************************************
45
46  Start the video hardware emulation.
47
48***************************************************************************/
49
50void odyssey2_state::video_start()
51{
52   m_start_vpos = I824X_START_Y;
53   m_start_vblank = I824X_START_Y + I824X_SCREEN_HEIGHT;
54
55   m_screen->register_screen_bitmap(m_tmp_bitmap);
56
57   m_line_timer = timer_alloc(TIMER_LINE);
58   m_line_timer->adjust( m_screen->time_until_pos(1, I824X_START_ACTIVE_SCAN ), 0,  m_screen->scan_period() );
59
60   m_hblank_timer = timer_alloc(TIMER_HBLANK);
61   m_hblank_timer->adjust( m_screen->time_until_pos(1, I824X_END_ACTIVE_SCAN + 18 ), 0, m_screen->scan_period() );
62}
63
64
65void odyssey2_state::video_start_g7400()
66{
67   video_start();
68
69   m_ef9340.X = 0;
70   m_ef9340.Y = 0;
71   m_ef9340.Y0 = 0;
72   m_ef9340.R = 0;
73   m_ef9340.M = 0;
74   m_ef9341.TA = 0;
75   m_ef9341.TB = 0;
76   m_ef9341.busy = 0;
77
78   m_g7400 = true;
79}
80
81
82
83/*
84    Thomson EF9340/EF9341 extra chips in the g7400
85 */
86
87UINT16 odyssey2_state::ef9340_get_c_addr(UINT8 x, UINT8 y)
88{
89   if ( ( y & 0x18 ) == 0x18 )
90   {
91      return 0x318 | ( ( x & 0x38 ) << 2 ) | ( x & 0x07 );
92   }
93   if ( x & 0x20 )
94   {
95      return 0x300 | ( ( y & 0x07 ) << 5 ) | ( y & 0x18 ) | ( x & 0x07 );
96   }
97   return y << 5 | x;
98}
99
100
101void odyssey2_state::ef9340_inc_c()
102{
103   m_ef9340.X++;
104   if ( m_ef9340.X >= 40 )
105   {
106      m_ef9340.Y = ( m_ef9340.Y + 1 ) % 24;
107      m_ef9340.X = 0;
108   }
109}
110
111
112UINT16 odyssey2_state::external_chargen_address(UINT8 b, UINT8 slice)
113{
114   UINT8 cc = b & 0x7f;
115
116   if ( slice & 8 )
117   {
118      // 0 0 CCE4 CCE3 CCE2 CCE1 CCE0 CCE6 CCE5 ADR0
119      return ( ( cc << 3 ) & 0xf8 ) | ( ( cc >> 4 ) & 0x06) | ( slice & 0x01 );
120   }
121   // CCE6 CCE5 CCE4 CCE3 CCE2 CCE1 CCE0 ADR2 ADR1 ADR0
122   return  ( cc << 3 ) | ( slice & 0x07 );
123}
124
125
126void odyssey2_state::ef9341_w( UINT8 command, UINT8 b, UINT8 data )
127{
128   logerror("ef9341 %s write, t%s, data %02X\n", command ? "command" : "data", b ? "B" : "A", data );
129
130   if ( command )
131   {
132      if ( b )
133      {
134         m_ef9341.TB = data;
135         m_ef9341.busy = 0x80;
136         switch( m_ef9341.TB & 0xE0 )
137         {
138         case 0x00:  /* Begin row */
139            m_ef9340.X = 0;
140            m_ef9340.Y = m_ef9341.TA & 0x1F;
141            break;
142         case 0x20:  /* Load Y */
143            m_ef9340.Y = m_ef9341.TA & 0x1F;
144            break;
145         case 0x40:  /* Load X */
146            m_ef9340.X = m_ef9341.TA & 0x3F;
147            break;
148         case 0x60:  /* INC C */
149            ef9340_inc_c();
150            break;
151         case 0x80:  /* Load M */
152            m_ef9340.M = m_ef9341.TA;
153            break;
154         case 0xA0:  /* Load R */
155            m_ef9340.R = m_ef9341.TA;
156            break;
157         case 0xC0:  /* Load Y0 */
158            m_ef9340.Y0 = m_ef9341.TA & 0x3F;
159            break;
160         }
161         m_ef9341.busy = 0;
162      }
163      else
164      {
165         m_ef9341.TA = data;
166      }
167   }
168   else
169   {
170      if ( b )
171      {
172         UINT16 addr = ef9340_get_c_addr( m_ef9340.X, m_ef9340.Y ) & 0x3ff;
173
174         m_ef9341.TB = data;
175         m_ef9341.busy = 0x80;
176         switch ( m_ef9340.M & 0xE0 )
177         {
178            case 0x00:  /* Write */
179               m_ef934x_ram_a[addr] = m_ef9341.TA;
180               m_ef934x_ram_b[addr] = m_ef9341.TB;
181               ef9340_inc_c();
182               break;
183
184            case 0x20:  /* Read */
185               m_ef9341.TA = m_ef934x_ram_a[addr];
186               m_ef9341.TB = m_ef934x_ram_b[addr];
187               ef9340_inc_c();
188               break;
189
190            case 0x40:  /* Write without increment */
191               m_ef934x_ram_a[addr] = m_ef9341.TA;
192               m_ef934x_ram_b[addr] = m_ef9341.TB;
193               break;
194
195            case 0x60:  /* Read without increment */
196               m_ef9341.TA = m_ef934x_ram_a[addr];
197               m_ef9341.TB = m_ef934x_ram_b[addr];
198               break;
199
200            case 0x80:  /* Write slice */
201               {
202                  UINT8 b = m_ef934x_ram_b[addr];
203                  UINT8 slice = ( m_ef9340.M & 0x0f ) % 10;
204
205                  if ( b >= 0xa0 )
206                  {
207                     m_ef934x_ext_char_ram[ external_chargen_address( b, slice ) ] = m_ef9341.TA;
208                  }
209
210                  // Increment slice number
211                  m_ef9340.M = ( m_ef9340.M & 0xf0) | ( ( slice + 1 ) % 10 );
212               }
213               break;
214
215            case 0xA0:  /* Read slice */
216               fatalerror/*logerror*/("ef9341 unimplemented data action %02X\n", m_ef9340.M & 0xE0 );
217               break;
218         }
219         m_ef9341.busy = 0;
220      }
221      else
222      {
223         m_ef9341.TA = data;
224      }
225   }
226}
227
228
229UINT8 odyssey2_state::ef9341_r( UINT8 command, UINT8 b )
230{
231   UINT8   data = 0xFF;
232
233   logerror("ef9341 %s read, t%s\n", command ? "command" : "data", b ? "B" : "A" );
234   if ( command )
235   {
236      if ( b )
237      {
238         data = 0xFF;
239      }
240      else
241      {
242         data = m_ef9341.busy;
243      }
244   }
245   else
246   {
247      if ( b )
248      {
249         data = m_ef9341.TB;
250      }
251      else
252      {
253         data = m_ef9341.TA;
254      }
255   }
256   return data;
257}
258
259
260void odyssey2_state::ef9340_scanline(int vpos)
261{
262   if ( vpos < m_start_vpos )
263   {
264      return;
265   }
266
267   if ( vpos < m_start_vblank )
268   {
269      int y = vpos - m_start_vpos;
270      int y_row, slice;
271
272      if ( y < 10 )
273      {
274         // Service row
275
276         if ( m_ef9340.R & 0x08 )
277         {
278            // Service row is enabled
279
280            y_row = 31;
281            slice = y;
282         }
283         else
284         {
285            // Service row is disabled
286
287            for ( int i = 0; i < 40 * 8; i++ )
288            {
289               m_tmp_bitmap.pix16(vpos, I824X_START_ACTIVE_SCAN*2 + i ) = 24;
290            }
291            return;
292         }
293      }
294      else
295      {
296         // Displaying regular row
297         y_row = (y - 10) / 10;
298         slice = (y - 10) % 10;
299      }
300
301      for ( int x = 0; x < 40; x++ )
302      {
303         UINT16 addr = ef9340_get_c_addr( x, y_row );
304         UINT8 a = m_ef934x_ram_a[addr];
305         UINT8 b = m_ef934x_ram_b[addr];
306         UINT8 fg = 24;
307         UINT8 bg = 24;
308         UINT8 char_data = 0x00;
309
310         if ( a & 0x80 )
311         {
312            // Graphics
313         }
314         else
315         {
316            // Alphannumeric
317            if ( b & 0x80 )
318            {
319               // Special (DEL or Extension)
320            }
321            else
322            {
323               // Normal
324               char_data = ef9341_char_set[0][b & 0x7f][slice];
325               fg = 24 + ( a & 0x07 );
326            }
327         }
328
329         for ( int i = 0; i < 8; i++ )
330         {
331            m_tmp_bitmap.pix16(vpos, I824X_START_ACTIVE_SCAN*2 + x*8 + i ) = (char_data & 0x80) ? fg : bg;
332            char_data <<= 1;
333         }
334      }
335   }
336}
337
trunk/src/mess/video/ef9341_chargen.h
r20225r20226
1static const UINT8 ef9341_char_set[2][128][10] = {
2   // Alphanumeric character set (128 characters)
3   {
4      { 0x00,0x38,0x44,0x40,0x20,0x10,0x00,0x10,0x00,0x00 },
5      { 0x00,0x10,0x28,0x00,0x38,0x44,0x7c,0x44,0x00,0x00 },
6      { 0x00,0x08,0x10,0x3c,0x20,0x30,0x20,0x3c,0x00,0x00 },
7      { 0x00,0x08,0x14,0x10,0x38,0x10,0x24,0x3c,0x00,0x00 },
8      { 0x00,0x10,0x38,0x50,0x38,0x14,0x54,0x38,0x10,0x00 },
9      { 0x00,0x38,0x44,0x40,0x40,0x40,0x44,0x38,0x10,0x20 },
10      { 0x00,0x28,0x28,0x7c,0x28,0x7c,0x28,0x28,0x00,0x00 },
11      { 0x00,0x20,0x18,0x00,0x38,0x44,0x7c,0x44,0x00,0x00 },
12      { 0x00,0x20,0x18,0x00,0x44,0x44,0x44,0x38,0x00,0x00 },
13      { 0x00,0x10,0x08,0x3c,0x20,0x30,0x20,0x3c,0x00,0x00 },
14      { 0x00,0x3c,0x50,0x50,0x58,0x50,0x50,0x3c,0x00,0x00 },
15      { 0x00,0x08,0x14,0x3c,0x20,0x30,0x20,0x3c,0x00,0x00 },
16      { 0x00,0x00,0x10,0x20,0x7f,0x20,0x10,0x00,0x00,0x00 },
17      { 0x00,0x10,0x38,0x54,0x10,0x10,0x10,0x10,0x10,0x10 },
18      { 0x00,0x00,0x08,0x04,0xfe,0x04,0x08,0x00,0x00,0x00 },
19      { 0x10,0x10,0x10,0x10,0x10,0x10,0x54,0x38,0x10,0x00 },
20      { 0x00,0x18,0x24,0x18,0x00,0x00,0x00,0x00,0x00,0x00 },
21      { 0x00,0x10,0x10,0x7c,0x10,0x10,0x00,0x7c,0x00,0x00 },
22      { 0x00,0x08,0x10,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
23      { 0x00,0x28,0x00,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
24      { 0x00,0x28,0x00,0x30,0x10,0x10,0x10,0x38,0x00,0x00 },
25      { 0x00,0x00,0x00,0x38,0x40,0x40,0x40,0x38,0x10,0x20 },
26      { 0x00,0x10,0x28,0x00,0x44,0x44,0x4c,0x34,0x00,0x00 },
27      { 0x00,0x20,0x10,0x34,0x4c,0x44,0x4c,0x34,0x00,0x00 },
28      { 0x00,0x00,0x10,0x00,0x7c,0x00,0x10,0x00,0x00,0x00 },
29      { 0x00,0x20,0x10,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
30      { 0x00,0x00,0x00,0x3c,0x52,0x5e,0x50,0x3e,0x00,0x00 },
31      { 0x00,0x10,0x28,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
32      { 0x00,0x40,0xc0,0x40,0x44,0x4c,0x14,0x3e,0x04,0x00 },
33      { 0x00,0x40,0xc0,0x40,0x4c,0x52,0x04,0x08,0x1e,0x00 },
34      { 0x00,0xe0,0x20,0x40,0x24,0xcc,0x14,0x3e,0x04,0x00 },
35      { 0x00,0x10,0x28,0x00,0x38,0x44,0x44,0x38,0x00,0x00 },
36      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
37      { 0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x10,0x00,0x00 },
38      { 0x00,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00 },
39      { 0x00,0x28,0x00,0x3c,0x20,0x30,0x20,0x3c,0x00,0x00 },
40      { 0x00,0x10,0x28,0x34,0x4c,0x44,0x4c,0x34,0x00,0x00 },
41      { 0x00,0x60,0x64,0x08,0x10,0x20,0x4c,0x0c,0x00,0x00 },
42      { 0x00,0x20,0x50,0x50,0x20,0x54,0x48,0x34,0x00,0x00 },
43      { 0x00,0x10,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
44      { 0x00,0x08,0x10,0x20,0x20,0x20,0x10,0x08,0x00,0x00 },
45      { 0x00,0x20,0x10,0x08,0x08,0x08,0x10,0x20,0x00,0x00 },
46      { 0x00,0x10,0x54,0x38,0x10,0x38,0x54,0x10,0x00,0x00 },
47      { 0x00,0x00,0x10,0x10,0x7c,0x10,0x10,0x00,0x00,0x00 },
48      { 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x40,0x00 },
49      { 0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00 },
50      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00 },
51      { 0x01,0x02,0x02,0x04,0x08,0x10,0x20,0x20,0x40,0x80 },
52      { 0x00,0x10,0x28,0x44,0x44,0x44,0x28,0x10,0x00,0x00 },
53      { 0x00,0x10,0x30,0x10,0x10,0x10,0x10,0x10,0x00,0x00 },
54      { 0x00,0x38,0x44,0x04,0x18,0x20,0x40,0x7c,0x00,0x00 },
55      { 0x00,0x7c,0x04,0x08,0x18,0x04,0x44,0x38,0x00,0x00 },
56      { 0x00,0x08,0x18,0x28,0x48,0x7c,0x08,0x08,0x00,0x00 },
57      { 0x00,0x7c,0x40,0x78,0x04,0x04,0x44,0x38,0x00,0x00 },
58      { 0x00,0x18,0x20,0x40,0x78,0x44,0x44,0x38,0x00,0x00 },
59      { 0x00,0x7c,0x04,0x08,0x10,0x20,0x20,0x20,0x00,0x00 },
60      { 0x00,0x38,0x44,0x44,0x38,0x44,0x44,0x38,0x00,0x00 },
61      { 0x00,0x38,0x44,0x44,0x3c,0x04,0x04,0x38,0x00,0x00 },
62      { 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00 },
63      { 0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x20,0x40,0x00 },
64      { 0x00,0x04,0x08,0x10,0x20,0x10,0x08,0x04,0x00,0x00 },
65      { 0x00,0x00,0x00,0x7c,0x00,0x7c,0x00,0x00,0x00,0x00 },
66      { 0x00,0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00,0x00 },
67      { 0x00,0x38,0x44,0x04,0x08,0x10,0x00,0x10,0x00,0x00 },
68      { 0x00,0x38,0x44,0x5c,0x54,0x5c,0x40,0x38,0x00,0x00 },
69      { 0x00,0x38,0x44,0x44,0x44,0x7c,0x44,0x44,0x00,0x00 },
70      { 0x00,0x78,0x44,0x44,0x78,0x44,0x44,0x78,0x00,0x00 },
71      { 0x00,0x38,0x44,0x40,0x40,0x40,0x44,0x38,0x00,0x00 },
72      { 0x00,0x78,0x44,0x44,0x44,0x44,0x44,0x78,0x00,0x00 },
73      { 0x00,0x7c,0x40,0x40,0x70,0x40,0x40,0x7c,0x00,0x00 },
74      { 0x00,0x7c,0x40,0x40,0x70,0x40,0x40,0x40,0x00,0x00 },
75      { 0x00,0x38,0x44,0x40,0x40,0x4c,0x44,0x3c,0x00,0x00 },
76      { 0x00,0x44,0x44,0x44,0x7c,0x44,0x44,0x44,0x00,0x00 },
77      { 0x00,0x38,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00 },
78      { 0x00,0x1c,0x08,0x08,0x08,0x08,0x48,0x30,0x00,0x00 },
79      { 0x00,0x44,0x48,0x50,0x60,0x50,0x48,0x44,0x00,0x00 },
80      { 0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x7c,0x00,0x00 },
81      { 0x00,0x44,0x6c,0x54,0x44,0x44,0x44,0x44,0x00,0x00 },
82      { 0x00,0x44,0x44,0x64,0x54,0x4c,0x44,0x44,0x00,0x00 },
83      { 0x00,0x38,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00 },
84      { 0x00,0x78,0x44,0x44,0x78,0x40,0x40,0x40,0x00,0x00 },
85      { 0x00,0x38,0x44,0x44,0x44,0x54,0x48,0x34,0x00,0x00 },
86      { 0x00,0x78,0x44,0x44,0x78,0x50,0x48,0x44,0x00,0x00 },
87      { 0x00,0x38,0x44,0x40,0x38,0x04,0x44,0x38,0x00,0x00 },
88      { 0x00,0x7c,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00 },
89      { 0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00 },
90      { 0x00,0x44,0x44,0x44,0x28,0x28,0x10,0x10,0x00,0x00 },
91      { 0x00,0x44,0x44,0x44,0x54,0x54,0x54,0x28,0x00,0x00 },
92      { 0x00,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x00,0x00 },
93      { 0x00,0x44,0x44,0x28,0x10,0x10,0x10,0x10,0x00,0x00 },
94      { 0x00,0x7c,0x04,0x08,0x10,0x20,0x40,0x7c,0x00,0x00 },
95      { 0x00,0x1c,0x10,0x10,0x10,0x10,0x10,0x1c,0x00,0x00 },
96      { 0x80,0x40,0x40,0x20,0x10,0x08,0x04,0x04,0x02,0x01 },
97      { 0x00,0x38,0x08,0x08,0x08,0x08,0x08,0x38,0x00,0x00 },
98      { 0x00,0x10,0x28,0x00,0x30,0x10,0x10,0x38,0x00,0x00 },
99      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff },
100      { 0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00 },
101      { 0x00,0x00,0x00,0x34,0x4c,0x44,0x4c,0x34,0x00,0x00 },
102      { 0x00,0x40,0x40,0x78,0x44,0x44,0x44,0x78,0x00,0x00 },
103      { 0x00,0x00,0x00,0x38,0x40,0x40,0x40,0x38,0x00,0x00 },
104      { 0x00,0x04,0x04,0x3c,0x44,0x44,0x44,0x3c,0x00,0x00 },
105      { 0x00,0x00,0x00,0x38,0x44,0x7c,0x40,0x38,0x00,0x00 },
106      { 0x00,0x18,0x24,0x20,0x70,0x20,0x20,0x20,0x00,0x00 },
107      { 0x00,0x00,0x00,0x3c,0x44,0x44,0x3c,0x04,0x24,0x18 },
108      { 0x00,0x40,0x40,0x58,0x64,0x44,0x44,0x44,0x00,0x00 },
109      { 0x00,0x10,0x00,0x30,0x10,0x10,0x10,0x38,0x00,0x00 },
110      { 0x00,0x08,0x00,0x18,0x08,0x08,0x08,0x08,0x48,0x30 },
111      { 0x00,0x20,0x20,0x24,0x28,0x30,0x28,0x24,0x00,0x00 },
112      { 0x00,0x30,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00 },
113      { 0x00,0x00,0x00,0x68,0x54,0x54,0x54,0x54,0x00,0x00 },
114      { 0x00,0x00,0x00,0x58,0x64,0x44,0x44,0x44,0x00,0x00 },
115      { 0x00,0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00,0x00 },
116      { 0x00,0x00,0x00,0x78,0x44,0x44,0x44,0x78,0x40,0x40 },
117      { 0x00,0x00,0x00,0x3c,0x44,0x44,0x44,0x3c,0x04,0x04 },
118      { 0x00,0x00,0x00,0x58,0x64,0x40,0x40,0x40,0x00,0x00 },
119      { 0x00,0x00,0x00,0x38,0x40,0x38,0x04,0x78,0x00,0x00 },
120      { 0x00,0x20,0x20,0x38,0x20,0x20,0x20,0x18,0x00,0x00 },
121      { 0x00,0x00,0x00,0x44,0x44,0x44,0x4c,0x34,0x00,0x00 },
122      { 0x00,0x00,0x00,0x44,0x44,0x28,0x28,0x10,0x00,0x00 },
123      { 0x00,0x00,0x00,0x44,0x44,0x54,0x54,0x28,0x00,0x00 },
124      { 0x00,0x00,0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00 },
125      { 0x00,0x00,0x00,0x44,0x44,0x4c,0x34,0x04,0x44,0x38 },
126      { 0x00,0x00,0x00,0x7c,0x08,0x10,0x20,0x7c,0x00,0x00 },
127      { 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 },
128      { 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10 },
129      { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 },
130      { 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
131      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }
132   },
133
134   {
135      // Separated semi-graphic character set (64 characters)
136      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
137      { 0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
138      { 0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
139      { 0x77,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
140      { 0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00 },
141      { 0x70,0x70,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00 },
142      { 0x07,0x07,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00 },
143      { 0x77,0x77,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00 },
144      { 0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00 },
145      { 0x70,0x70,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00 },
146      { 0x07,0x07,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00 },
147      { 0x77,0x77,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00 },
148      { 0x00,0x00,0x00,0x77,0x77,0x77,0x00,0x00,0x00,0x00 },
149      { 0x70,0x70,0x00,0x77,0x77,0x77,0x00,0x00,0x00,0x00 },
150      { 0x07,0x07,0x00,0x77,0x77,0x77,0x00,0x00,0x00,0x00 },
151      { 0x77,0x77,0x00,0x77,0x77,0x77,0x00,0x00,0x00,0x00 },
152      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x00 },
153      { 0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x00 },
154      { 0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x00 },
155      { 0x77,0x77,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x00 },
156      { 0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x70,0x70,0x00 },
157      { 0x70,0x70,0x00,0x70,0x70,0x70,0x00,0x70,0x70,0x00 },
158      { 0x07,0x07,0x00,0x70,0x70,0x70,0x00,0x70,0x70,0x00 },
159      { 0x77,0x77,0x00,0x70,0x70,0x70,0x00,0x70,0x70,0x00 },
160      { 0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x70,0x70,0x00 },
161      { 0x70,0x70,0x00,0x07,0x07,0x07,0x00,0x70,0x70,0x00 },
162      { 0x07,0x07,0x00,0x07,0x07,0x07,0x00,0x70,0x70,0x00 },
163      { 0x77,0x77,0x00,0x07,0x07,0x07,0x00,0x70,0x70,0x00 },
164      { 0x00,0x00,0x00,0x77,0x77,0x77,0x00,0x70,0x70,0x00 },
165      { 0x70,0x70,0x00,0x77,0x77,0x77,0x00,0x70,0x70,0x00 },
166      { 0x07,0x07,0x00,0x77,0x77,0x77,0x00,0x70,0x70,0x00 },
167      { 0x77,0x77,0x00,0x77,0x77,0x77,0x00,0x70,0x70,0x00 },
168      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00 },
169      { 0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00 },
170      { 0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00 },
171      { 0x77,0x77,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00 },
172      { 0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x07,0x07,0x00 },
173      { 0x70,0x70,0x00,0x70,0x70,0x70,0x00,0x07,0x07,0x00 },
174      { 0x07,0x07,0x00,0x70,0x70,0x70,0x00,0x07,0x07,0x00 },
175      { 0x77,0x77,0x00,0x70,0x70,0x70,0x00,0x07,0x07,0x00 },
176      { 0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x07,0x07,0x00 },
177      { 0x70,0x70,0x00,0x07,0x07,0x07,0x00,0x07,0x07,0x00 },
178      { 0x07,0x07,0x00,0x07,0x07,0x07,0x00,0x07,0x07,0x00 },
179      { 0x77,0x77,0x00,0x07,0x07,0x07,0x00,0x07,0x07,0x00 },
180      { 0x00,0x00,0x00,0x77,0x77,0x77,0x00,0x07,0x07,0x00 },
181      { 0x70,0x70,0x00,0x77,0x77,0x77,0x00,0x07,0x07,0x00 },
182      { 0x07,0x07,0x00,0x77,0x77,0x77,0x00,0x07,0x07,0x00 },
183      { 0x77,0x77,0x00,0x77,0x77,0x77,0x00,0x07,0x07,0x00 },
184      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x00 },
185      { 0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x00 },
186      { 0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x00 },
187      { 0x77,0x77,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x00 },
188      { 0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x77,0x77,0x00 },
189      { 0x70,0x70,0x00,0x70,0x70,0x70,0x00,0x77,0x77,0x00 },
190      { 0x07,0x07,0x00,0x70,0x70,0x70,0x00,0x77,0x77,0x00 },
191      { 0x77,0x77,0x00,0x70,0x70,0x70,0x00,0x77,0x77,0x00 },
192      { 0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x77,0x77,0x00 },
193      { 0x70,0x70,0x00,0x07,0x07,0x07,0x00,0x77,0x77,0x00 },
194      { 0x07,0x07,0x00,0x07,0x07,0x07,0x00,0x77,0x77,0x00 },
195      { 0x77,0x77,0x00,0x07,0x07,0x07,0x00,0x77,0x77,0x00 },
196      { 0x00,0x00,0x00,0x77,0x77,0x77,0x00,0x77,0x77,0x00 },
197      { 0x70,0x70,0x00,0x77,0x77,0x77,0x00,0x77,0x77,0x00 },
198      { 0x07,0x07,0x00,0x77,0x77,0x77,0x00,0x77,0x77,0x00 },
199      { 0x77,0x77,0x00,0x77,0x77,0x77,0x00,0x77,0x77,0x00 },
200
201      // Mosaic semi-graphic character set (64 characters)
202      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
203      { 0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
204      { 0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
205      { 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
206      { 0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00 },
207      { 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00 },
208      { 0x0f,0x0f,0x0f,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00 },
209      { 0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0x00,0x00,0x00 },
210      { 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00 },
211      { 0xf0,0xf0,0xf0,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00 },
212      { 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00 },
213      { 0xff,0xff,0xff,0x0f,0x0f,0x0f,0x0f,0x00,0x00,0x00 },
214      { 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00 },
215      { 0xf0,0xf0,0xf0,0xff,0xff,0xff,0xff,0x00,0x00,0x00 },
216      { 0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0x00,0x00,0x00 },
217      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00 },
218      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0 },
219      { 0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0 },
220      { 0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0 },
221      { 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0 },
222      { 0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0 },
223      { 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0 },
224      { 0x0f,0x0f,0x0f,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0 },
225      { 0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0 },
226      { 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0xf0,0xf0,0xf0 },
227      { 0xf0,0xf0,0xf0,0x0f,0x0f,0x0f,0x0f,0xf0,0xf0,0xf0 },
228      { 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0xf0,0xf0,0xf0 },
229      { 0xff,0xff,0xff,0x0f,0x0f,0x0f,0x0f,0xf0,0xf0,0xf0 },
230      { 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0 },
231      { 0xf0,0xf0,0xf0,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0 },
232      { 0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0 },
233      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0 },
234      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f },
235      { 0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f },
236      { 0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f },
237      { 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f },
238      { 0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0x0f,0x0f,0x0f },
239      { 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x0f,0x0f,0x0f },
240      { 0x0f,0x0f,0x0f,0xf0,0xf0,0xf0,0xf0,0x0f,0x0f,0x0f },
241      { 0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0x0f,0x0f,0x0f },
242      { 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f },
243      { 0xf0,0xf0,0xf0,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f },
244      { 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f },
245      { 0xff,0xff,0xff,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f },
246      { 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x0f,0x0f,0x0f },
247      { 0xf0,0xf0,0xf0,0xff,0xff,0xff,0xff,0x0f,0x0f,0x0f },
248      { 0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0x0f,0x0f,0x0f },
249      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x0f,0x0f },
250      { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff },
251      { 0xf0,0xf0,0xf0,0x00,0x00,0x00,0x00,0xff,0xff,0xff },
252      { 0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0xff,0xff,0xff },
253      { 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff },
254      { 0x00,0x00,0x00,0xf0,0xf0,0xf0,0xf0,0xff,0xff,0xff },
255      { 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xff,0xff,0xff },
256      { 0x0f,0x0f,0x0f,0xf0,0xf0,0xf0,0xf0,0xff,0xff,0xff },
257      { 0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0xff,0xff,0xff },
258      { 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x0f,0xff,0xff,0xff },
259      { 0xf0,0xf0,0xf0,0x0f,0x0f,0x0f,0x0f,0xff,0xff,0xff },
260      { 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0xff,0xff,0xff },
261      { 0xff,0xff,0xff,0x0f,0x0f,0x0f,0x0f,0xff,0xff,0xff },
262      { 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
263      { 0xf0,0xf0,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
264      { 0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
265      { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }
266   }
267};

Previous 199869 Revisions Next


© 1997-2024 The MAME Team