Previous 15994 Revisions Next

r7927 Thursday 29th April, 2010 at 06:52:55 UTC by Curt Coder
[CGC7900] Cleanup.
[src/mess/drivers]cgc7900.c
[src/mess/includes]cgc7900.h
[src/mess/video]cgc7900.c

src/mess/video/cgc7900.c
r7926r7927
11#include "emu.h"
22#include "includes/cgc7900.h"
33
4static PALETTE_INIT( cgc7900 )
4/***************************************************************************
5    PARAMETERS
6***************************************************************************/
7
8#define OVERLAY_CUR      BIT(cell, 31)   /* places a cursor in the cell if SET */
9#define OVERLAY_BLK      BIT(cell, 30)   /* blinks the foreground character in the cell if SET */
10#define OVERLAY_VF      BIT(cell, 28)   /* makes the foreground visible if SET (else transparent) */
11#define OVERLAY_VB      BIT(cell, 27)   /* makes the background visible if SET (else transparent) */
12#define OVERLAY_PL      BIT(cell, 24)   /* uses bits 0-7 as PLOT DOT descriptor if SET (else ASCII) */
13#define OVERLAY_BR      BIT(cell, 18)   /* turns on Red in background if SET */
14#define OVERLAY_BG      BIT(cell, 17)   /* turns on Green in background if SET */
15#define OVERLAY_BB      BIT(cell, 16)   /* turns on Blue in background if SET */
16#define OVERLAY_FR      BIT(cell, 10)   /* turns on Red in foreground if SET */
17#define OVERLAY_FG      BIT(cell, 9)   /* turns on Green in foreground if SET */
18#define OVERLAY_FB      BIT(cell, 8)   /* turns on Blue in background if SET */
19#define OVERLAY_DATA   (cell & 0xff)   /* ASCII or Plot Dot character */
20
21/***************************************************************************
22    READ/WRITE HANDLERS
23***************************************************************************/
24
25/*-------------------------------------------------
26    cgc7900_z_mode_r - Z mode read
27-------------------------------------------------*/
28
29READ16_HANDLER( cgc7900_z_mode_r )
530{
6   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00 );
7   palette_set_color_rgb(machine, 1, 0x00, 0x00, 0xff );
8   palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00 );
9   palette_set_color_rgb(machine, 3, 0x00, 0xff, 0xff );
10   palette_set_color_rgb(machine, 4, 0xff, 0x00, 0x00 );
11   palette_set_color_rgb(machine, 5, 0xff, 0x00, 0xff );
12   palette_set_color_rgb(machine, 6, 0xff, 0xff, 0x00 );
13   palette_set_color_rgb(machine, 7, 0xff, 0xff, 0xff );
31   return 0;
1432}
1533
16static VIDEO_START( cgc7900 )
34/*-------------------------------------------------
35    cgc7900_z_mode_w - Z mode write
36-------------------------------------------------*/
37
38WRITE16_HANDLER( cgc7900_z_mode_w )
1739{
18   cgc7900_state *state = (cgc7900_state *)machine->driver_data;
40}
1941
20   /* find memory regions */
21   state->char_rom = memory_region(machine, "gfx1");
42/*-------------------------------------------------
43    cgc7900_color_status_w - color status write
44-------------------------------------------------*/
45
46WRITE16_HANDLER( cgc7900_color_status_w )
47{
2248}
2349
50/*-------------------------------------------------
51    cgc7900_sync_r - sync information read
52-------------------------------------------------*/
53
54READ16_HANDLER( cgc7900_sync_r )
55{
56   return 0;
57}
58
59/***************************************************************************
60    VIDEO
61***************************************************************************/
62
63/*-------------------------------------------------
64    update_clut - update color lookup table
65-------------------------------------------------*/
66
2467static void update_clut(running_machine *machine)
2568{
2669   cgc7900_state *state = (cgc7900_state *)machine->driver_data;
r7926r7927
3275      UINT8 b = data & 0xff;
3376      UINT8 g = (data >> 8) & 0xff;
3477      UINT8 r = (data >> 16) & 0xff;
35
36//      logerror("CLUT %u : %08x\n", i, data);
3778     
3879      palette_set_color_rgb(machine, i + 8, r, g, b);
3980   }
4081}
4182
42#define OVERLAY_CUR      BIT(cell, 31)   /* places a cursor in the cell if SET */
43#define OVERLAY_BLK      BIT(cell, 30)   /* blinks the foreground character in the cell if SET */
44#define OVERLAY_VF      BIT(cell, 28)   /* makes the foreground visible if SET (else transparent) */
45#define OVERLAY_VB      BIT(cell, 27)   /* makes the background visible if SET (else transparent) */
46#define OVERLAY_PL      BIT(cell, 24)   /* uses bits 0-7 as PLOT DOT descriptor if SET (else ASCII) */
47#define OVERLAY_BR      BIT(cell, 18)   /* turns on Red in background if SET */
48#define OVERLAY_BG      BIT(cell, 17)   /* turns on Green in background if SET */
49#define OVERLAY_BB      BIT(cell, 16)   /* turns on Blue in background if SET */
50#define OVERLAY_FR      BIT(cell, 10)   /* turns on Red in foreground if SET */
51#define OVERLAY_FG      BIT(cell, 9)   /* turns on Green in foreground if SET */
52#define OVERLAY_FB      BIT(cell, 8)   /* turns on Blue in background if SET */
53#define OVERLAY_DATA   (cell & 0xff)   /* ASCII or Plot Dot character */
83/*-------------------------------------------------
84    draw_image - draw bitmap image
85-------------------------------------------------*/
5486
87static void draw_image(running_device *screen, bitmap_t *bitmap)
88{
89}
90
91/*-------------------------------------------------
92    draw_overlay - draw text overlay
93-------------------------------------------------*/
94
5595static void draw_overlay(running_device *screen, bitmap_t *bitmap)
5696{
5797   cgc7900_state *state = (cgc7900_state *)screen->machine->driver_data;
r7926r7927
91131   }
92132}
93133
134/*-------------------------------------------------
135    PALETTE_INIT( cgc7900 )
136-------------------------------------------------*/
137
138static PALETTE_INIT( cgc7900 )
139{
140   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00 );
141   palette_set_color_rgb(machine, 1, 0x00, 0x00, 0xff );
142   palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00 );
143   palette_set_color_rgb(machine, 3, 0x00, 0xff, 0xff );
144   palette_set_color_rgb(machine, 4, 0xff, 0x00, 0x00 );
145   palette_set_color_rgb(machine, 5, 0xff, 0x00, 0xff );
146   palette_set_color_rgb(machine, 6, 0xff, 0xff, 0x00 );
147   palette_set_color_rgb(machine, 7, 0xff, 0xff, 0xff );
148}
149
150/*-------------------------------------------------
151    VIDEO_START( cgc7900 )
152-------------------------------------------------*/
153
154static VIDEO_START( cgc7900 )
155{
156   cgc7900_state *state = (cgc7900_state *)machine->driver_data;
157
158   /* find memory regions */
159   state->char_rom = memory_region(machine, "gfx1");
160}
161
162/*-------------------------------------------------
163    VIDEO_UPDATE( cgc7900 )
164-------------------------------------------------*/
165
94166static VIDEO_UPDATE( cgc7900 )
95167{
96//   cgc7900_state *state = (cgc7900_state *)screen->machine->driver_data;
97
98168   update_clut(screen->machine);
169   draw_image(screen, bitmap);
99170   draw_overlay(screen, bitmap);
100171
101172    return 0;
102173}
103174
175/*-------------------------------------------------
176    gfx_layout cgc7900_charlayout
177-------------------------------------------------*/
178
104179static const gfx_layout cgc7900_charlayout =
105180{
106181   8,8,
r7926r7927
112187   8*8
113188};
114189
190/*-------------------------------------------------
191    GFXDECODE( cgc7900 )
192-------------------------------------------------*/
193
115194static GFXDECODE_START( cgc7900 )
116195   GFXDECODE_ENTRY( "gfx1", 0x0000, cgc7900_charlayout, 0, 1 )
117196GFXDECODE_END
118197
198/***************************************************************************
199    MACHINE DRIVERS
200***************************************************************************/
201
202/*-------------------------------------------------
203   MACHINE_DRIVER( cgc7900_video )
204-------------------------------------------------*/
205
119206MACHINE_DRIVER_START( cgc7900_video )
120207    MDRV_SCREEN_ADD(SCREEN_TAG, RASTER)
121208    MDRV_SCREEN_REFRESH_RATE(60)
src/mess/includes/cgc7900.h
r7926r7927
44#define __CGC7900__
55
66#define M68000_TAG      "uh8"
7#define I8035_TAG      "i8035"
78#define INS8251_0_TAG   "uc10"
89#define INS8251_1_TAG   "uc8"
910#define MM58167_TAG      "uc6"
r7926r7927
1718
1819   cgc7900_state(running_machine &machine) { }
1920
21   /* interrupt state */
22   UINT16 int_mask;
23
2024   /* video state */
2125   UINT16 *plane_ram;
2226   UINT16 *clut_ram;
2327   UINT16 *overlay_ram;
2428   UINT8 *char_rom;
29   UINT16 roll_bitmap;
30   UINT16 pan_x;
31   UINT16 pan_y;
32   UINT16 zoom;
33   UINT16 blink_select;
34   UINT16 plane_select;
35   UINT16 plane_switch;
36   UINT16 color_status_fg;
37   UINT16 color_status_bg;
38   UINT16 roll_overlay;
2539};
2640
2741/*----------- defined in video/cgc7900.c -----------*/
2842
29MACHINE_DRIVER_EXTERN(cgc7900_video);
43READ16_HANDLER( cgc7900_z_mode_r );
44WRITE16_HANDLER( cgc7900_z_mode_w );
45WRITE16_HANDLER( cgc7900_color_status_w );
46READ16_HANDLER( cgc7900_sync_r );
3047
48MACHINE_DRIVER_EXTERN( cgc7900_video );
49
3150#endif
src/mess/drivers/cgc7900.c
r7926r7927
66
77****************************************************************************/
88
9/*
10
11   TODO:
12
13   - does not boot
14   - mirror ROM to 000000
15   - floppy
16   - bitmap display
17   - Z mode read/write
18   - color status write
19   - bitmap roll
20   - overlay roll
21   - blinking
22   - keyboard
23   - joystick
24   - light pen
25   - memory parity
26   - sync
27   - disk DMA
28   - PIO DMA
29   - serial port controller
30   - HVG
31
32*/
33
934#include "emu.h"
1035#include "includes/cgc7900.h"
1136#include "cpu/m68000/m68000.h"
37#include "cpu/mcs48/mcs48.h"
1238#include "formats/basicdsk.h"
1339#include "devices/messram.h"
1440#include "machine/msm8251.h"
1541#include "sound/ay8910.h"
1642
17static UINT16* chrom_ram;
1843
44static UINT16* chrom_ram; // TODO remove
45
46
47/***************************************************************************
48    PARAMETERS
49***************************************************************************/
50
51#define INT_RTC            0x0001
52#define INT_RS449_TXRDY      0x0002
53#define INT_BINT2         0x0004
54#define INT_RS232_TXRDY      0x0008
55#define INT_DISK         0x0010
56#define INT_BINT3         0x0020
57#define INT_BEZEL         0x0040
58#define INT_KEYBOARD      0x0080
59#define INT_RS449_RXRDY      0x0100
60#define INT_LIGHT_PEN      0x0200
61#define INT_BINT4         0x0400
62#define INT_JOYSTICK      0x0800
63#define INT_VSYNC         0x1000
64#define INT_BINT5         0x2000
65#define INT_BINT1         0x4000
66#define INT_RS232_RXRDY      0x8000
67
68static const int INT_LEVEL[] = { 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5 };
69
70/***************************************************************************
71    READ/WRITE HANDLERS
72***************************************************************************/
73
74/*-------------------------------------------------
75    keyboard_r - keyboard data read
76-------------------------------------------------*/
77
78static READ16_HANDLER( keyboard_r )
79{
80   return 0;
81}
82
83/*-------------------------------------------------
84    keyboard_w - keyboard data write
85-------------------------------------------------*/
86
87static WRITE16_HANDLER( keyboard_w )
88{
89}
90
91/*-------------------------------------------------
92    interrupt_mask_w - interrupt mask write
93-------------------------------------------------*/
94
95static WRITE16_HANDLER( interrupt_mask_w )
96{
97   cgc7900_state *state = (cgc7900_state *)space->machine->driver_data;
98
99   state->int_mask = data;
100}
101
102/***************************************************************************
103    MEMORY MAPS
104***************************************************************************/
105
106/*-------------------------------------------------
107    ADDRESS_MAP( cgc7900_mem )
108-------------------------------------------------*/
109
19110static ADDRESS_MAP_START( cgc7900_mem, ADDRESS_SPACE_PROGRAM, 16 )
20   ADDRESS_MAP_UNMAP_HIGH
21   AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_BASE(&chrom_ram) // 16 * Buffer card memory
111//   ADDRESS_MAP_UNMAP_HIGH
112   AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_BASE(&chrom_ram)
22113   AM_RANGE(0x800000, 0x80ffff) AM_ROM AM_REGION(M68000_TAG, 0)   
23//   AM_RANGE(0xa00000, 0xbfffff) AM_READWRITE(z_mode_r, z_mode_w)
114   AM_RANGE(0xa00000, 0xbfffff) AM_READWRITE(cgc7900_z_mode_r, cgc7900_z_mode_w)
24115   AM_RANGE(0xc00000, 0xdfffff) AM_RAM AM_BASE_MEMBER(cgc7900_state, plane_ram)
25//   AM_RANGE(0xe00000, 0xe1ffff) AM_WRITE(color_status_w)
116   AM_RANGE(0xe00000, 0xe1ffff) AM_WRITE(cgc7900_color_status_w)
26117//   AM_RANGE(0xe20000, 0xe23fff) Raster Processor
27118   AM_RANGE(0xe30000, 0xe303ff) AM_RAM AM_BASE_MEMBER(cgc7900_state, clut_ram)
28119   AM_RANGE(0xe38000, 0xe3bfff) AM_RAM AM_BASE_MEMBER(cgc7900_state, overlay_ram)
29//   AM_RANGE(0xe40000, 0xe40fff) AM_RAM
30//   AM_RANGE(0xe40000, 0xe40001) Bitmap roll counter
31//   AM_RANGE(0xe40002, 0xe40003) X Pan
32//   AM_RANGE(0xe40004, 0xe40005) Y Pan
33//   AM_RANGE(0xe40006, 0xe40007) X/Y Zoom
34//   AM_RANGE(0xe4000a, 0xe4000f) Raster Processor
35//   AM_RANGE(0xe40010, 0xe40011) Blink Select
36//   AM_RANGE(0xe40012, 0xe40013) Plane Select
37//   AM_RANGE(0xe40014, 0xe40015) Plane Video Switch
38//   AM_RANGE(0xe40016, 0xe40017) AM_WRITE(color_status_fg_w)
39//   AM_RANGE(0xe40018, 0xe40019) AM_WRITE(color_status_bg_w)
40//   AM_RANGE(0xe4001a, 0xe4001b) Overlay Roll Counter
120   AM_RANGE(0xe40000, 0xe40001) AM_RAM AM_BASE_MEMBER(cgc7900_state, roll_bitmap)
121   AM_RANGE(0xe40002, 0xe40003) AM_RAM AM_BASE_MEMBER(cgc7900_state, pan_x)
122   AM_RANGE(0xe40004, 0xe40005) AM_RAM AM_BASE_MEMBER(cgc7900_state, pan_y)
123   AM_RANGE(0xe40006, 0xe40007) AM_RAM AM_BASE_MEMBER(cgc7900_state, zoom)
124   AM_RANGE(0xe40008, 0xe40009) AM_RAM
125   AM_RANGE(0xe4000a, 0xe4000f) AM_RAM // Raster Processor
126   AM_RANGE(0xe40010, 0xe40011) AM_RAM AM_BASE_MEMBER(cgc7900_state, blink_select)
127   AM_RANGE(0xe40012, 0xe40013) AM_RAM AM_BASE_MEMBER(cgc7900_state, plane_select)
128   AM_RANGE(0xe40014, 0xe40015) AM_RAM AM_BASE_MEMBER(cgc7900_state, plane_switch)
129   AM_RANGE(0xe40016, 0xe40017) AM_RAM AM_BASE_MEMBER(cgc7900_state, color_status_fg)
130   AM_RANGE(0xe40018, 0xe40019) AM_RAM AM_BASE_MEMBER(cgc7900_state, color_status_bg)
131   AM_RANGE(0xe4001a, 0xe4001b) AM_RAM AM_BASE_MEMBER(cgc7900_state, roll_overlay)
132   AM_RANGE(0xe4001c, 0xe40fff) AM_RAM
41133//   AM_RANGE(0xefc440, 0xefc441) HVG Load X
42134//   AM_RANGE(0xefc442, 0xefc443) HVG Load Y
43135//   AM_RANGE(0xefc444, 0xefc445) HVG Load dX
44136//   AM_RANGE(0xefc446, 0xefc447) HVG Load dY
45137//   AM_RANGE(0xefc448, 0xefc449) HVG Load Pixel Color
46138//   AM_RANGE(0xefc44a, 0xefc44b) HVG Load Trip
47   AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8(INS8251_0_TAG, msm8251_data_r, msm8251_data_w, 0x00ff)
48   AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8(INS8251_0_TAG, msm8251_status_r, msm8251_control_w, 0x00ff)
49   AM_RANGE(0xff8040, 0xff8041) AM_DEVREADWRITE8(INS8251_1_TAG, msm8251_data_r, msm8251_data_w, 0x00ff)
50   AM_RANGE(0xff8042, 0xff8043) AM_DEVREADWRITE8(INS8251_1_TAG, msm8251_status_r, msm8251_control_w, 0x00ff)
51//   AM_RANGE(0xff8080, 0xff8081) Keyboard
139   AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8(INS8251_0_TAG, msm8251_data_r, msm8251_data_w, 0xff00)
140   AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8(INS8251_0_TAG, msm8251_status_r, msm8251_control_w, 0xff00)
141   AM_RANGE(0xff8040, 0xff8041) AM_DEVREADWRITE8(INS8251_1_TAG, msm8251_data_r, msm8251_data_w, 0xff00)
142   AM_RANGE(0xff8042, 0xff8043) AM_DEVREADWRITE8(INS8251_1_TAG, msm8251_status_r, msm8251_control_w, 0xff00)
143   AM_RANGE(0xff8080, 0xff8081) AM_READWRITE(keyboard_r, keyboard_w)
52144//   AM_RANGE(0xff80c6, 0xff80c7) Joystick X axis
53145//   AM_RANGE(0xff80ca, 0xff80cb) Joystick Y axis
54146//   AM_RANGE(0xff80cc, 0xff80cd) Joystick Z axis
r7926r7927
56148//   AM_RANGE(0xff8120, 0xff8121) Disk control/status port
57149//   AM_RANGE(0xff8141, 0xff8141) Bezel switches
58150//   AM_RANGE(0xff8181, 0xff8181) Baud rate generator
59//   AM_RANGE(0xff81c0, 0xff81ff) AM_DEVREADWRITE8(MM58167_TAG, mm58167_r, mm58167_w, 0x00ff)
60//   AM_RANGE(0xff8200, 0xff8201) Interrupt Mask
151//   AM_RANGE(0xff81c0, 0xff81ff) AM_DEVREADWRITE8(MM58167_TAG, mm58167_r, mm58167_w, 0xff00)
152   AM_RANGE(0xff8200, 0xff8201) AM_WRITE(interrupt_mask_w)
61153//   AM_RANGE(0xff8240, 0xff8241) Light Pen enable
62154//   AM_RANGE(0xff8242, 0xff8243) Light Pen X value
63155//   AM_RANGE(0xff8244, 0xff8245) Light Pen Y value
64156//   AM_RANGE(0xff8246, 0xff8247) Buffer memory parity check
65157//   AM_RANGE(0xff8248, 0xff8249) Buffer memory parity set/reset
66//   AM_RANGE(0xff824a, 0xff824b) Sync information
67   AM_RANGE(0xff83c0, 0xff83c1) AM_DEVWRITE8(AY8910_TAG, ay8910_address_w, 0x00ff)
68   AM_RANGE(0xff83c2, 0xff83c3) AM_DEVREAD8(AY8910_TAG, ay8910_r, 0x00ff)
69   AM_RANGE(0xff83c4, 0xff83c5) AM_DEVWRITE8(AY8910_TAG, ay8910_data_w, 0x00ff)
158   AM_RANGE(0xff824a, 0xff824b) AM_READ(cgc7900_sync_r)
159   AM_RANGE(0xff83c0, 0xff83c1) AM_DEVWRITE8(AY8910_TAG, ay8910_address_w, 0xff00)
160   AM_RANGE(0xff83c2, 0xff83c3) AM_DEVREAD8(AY8910_TAG, ay8910_r, 0xff00)
161   AM_RANGE(0xff83c4, 0xff83c5) AM_DEVWRITE8(AY8910_TAG, ay8910_data_w, 0xff00)
70162//   AM_RANGE(0xff8500, 0xff8501) Disk DMA Command Register
71163//   AM_RANGE(0xff8502, 0xff8503) Disk DMA Address Register
72164//   AM_RANGE(0xff8507, 0xff8507) Disk DMA Control/Status Register
73165ADDRESS_MAP_END
74166
75/* Input ports */
76static INPUT_PORTS_START( cgc7900 )
77INPUT_PORTS_END
167/*-------------------------------------------------
168    ADDRESS_MAP( keyboard_mem )
169-------------------------------------------------*/
78170
79static MACHINE_START( cgc7900 )
80{
81   cgc7900_state *state = (cgc7900_state *)machine->driver_data;
171static ADDRESS_MAP_START( keyboard_mem, ADDRESS_SPACE_PROGRAM, 8 )
172   AM_RANGE(0x000, 0x7ff) AM_ROM
173ADDRESS_MAP_END
82174
83   /* register for state saving */
84   state_save_register_global_pointer(machine, state->overlay_ram, 0x4000);
85}
175/*-------------------------------------------------
176    ADDRESS_MAP( keyboard_io )
177-------------------------------------------------*/
86178
87static MACHINE_RESET(cgc7900)
88{
89   UINT8* user1 = memory_region(machine, M68000_TAG);
179static ADDRESS_MAP_START( keyboard_io, ADDRESS_SPACE_IO, 8 )
180/*   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1)
181   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2)
182   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1)
183   AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS)*/
184ADDRESS_MAP_END
90185
91   memcpy((UINT8*)chrom_ram,user1,0x10000);
186/***************************************************************************
187    INPUT PORTS
188***************************************************************************/
92189
93   devtag_get_device(machine, M68000_TAG)->reset();
94}
190/*-------------------------------------------------
191    INPUT_PORTS( cgc7900 )
192-------------------------------------------------*/
95193
194static INPUT_PORTS_START( cgc7900 )
195INPUT_PORTS_END
96196
197/***************************************************************************
198    DEVICE CONFIGURATION
199***************************************************************************/
200
201/*-------------------------------------------------
202    msm8251_interface rs232_intf
203-------------------------------------------------*/
204
97205static msm8251_interface rs232_intf =
98206{
99207   NULL,
r7926r7927
101209   NULL
102210};
103211
212/*-------------------------------------------------
213    msm8251_interface rs449_intf
214-------------------------------------------------*/
215
104216static msm8251_interface rs449_intf =
105217{
106218   NULL,
r7926r7927
108220   NULL
109221};
110222
223/*-------------------------------------------------
224    ay8910_interface ay8910_intf
225-------------------------------------------------*/
226
111227static const ay8910_interface ay8910_intf =
112228{
113229   AY8910_LEGACY_OUTPUT,
r7926r7927
118234   DEVCB_NULL
119235};
120236
237/***************************************************************************
238    MACHINE INITIALIZATION
239***************************************************************************/
240
241/*-------------------------------------------------
242    MACHINE_START( cgc7900 )
243-------------------------------------------------*/
244
245static MACHINE_START( cgc7900 )
246{
247   cgc7900_state *state = (cgc7900_state *)machine->driver_data;
248
249   /* register for state saving */
250   state_save_register_global_pointer(machine, state->overlay_ram, 0x4000);
251}
252
253/*-------------------------------------------------
254    MACHINE_RESET( cgc7900 )
255-------------------------------------------------*/
256
257static MACHINE_RESET(cgc7900)
258{
259   UINT8* user1 = memory_region(machine, M68000_TAG);
260
261   memcpy((UINT8*)chrom_ram,user1,0x10000);
262
263   devtag_get_device(machine, M68000_TAG)->reset();
264}
265
266/***************************************************************************
267    MACHINE DRIVERS
268***************************************************************************/
269
270/*-------------------------------------------------
271    MACHINE_DRIVER( cgc7900 )
272-------------------------------------------------*/
273
121274static MACHINE_DRIVER_START( cgc7900 )
122275   MDRV_DRIVER_DATA(cgc7900_state)
123276
r7926r7927
125278    MDRV_CPU_ADD(M68000_TAG, M68000, XTAL_8MHz)
126279    MDRV_CPU_PROGRAM_MAP(cgc7900_mem)
127280
128    MDRV_MACHINE_START(cgc7900)
281   MDRV_CPU_ADD(I8035_TAG, I8035, 1000000)
282    MDRV_CPU_PROGRAM_MAP(keyboard_mem)
283   MDRV_CPU_IO_MAP(keyboard_io)
284
285   MDRV_MACHINE_START(cgc7900)
129286    MDRV_MACHINE_RESET(cgc7900)
130287   
131288    /* video hardware */
r7926r7927
142299   MDRV_MSM8251_ADD(INS8251_1_TAG, rs449_intf)
143300MACHINE_DRIVER_END
144301
145/* ROM definition */
302/***************************************************************************
303    ROMS
304***************************************************************************/
305
146306ROM_START( cgc7900 )
147307    ROM_REGION( 0x10000, M68000_TAG, 0 )
148   ROM_LOAD16_BYTE( "210274 800k even a3ee term 1.4.ue24", 0x0000, 0x1000, CRC(5fa8f368) SHA1(120dbcfedce0badd38bf5b23e1fbc99667eb286c) )
149   ROM_LOAD16_BYTE( "210275 800k odd bbb3 term 1.4.uf24", 0x0001, 0x1000, CRC(4d479457) SHA1(5fa96a1eadfd9ba493d28691286e2e001a489a19) )
150   ROM_LOAD16_BYTE( "210276 802k even 0c22 term 1.4.ue22", 0x2000, 0x1000, CRC(c88c44ec) SHA1(f39d8a3cf7aaefd815b4426348965b076c1f2265) )
151   ROM_LOAD16_BYTE( "210277 802k odd b58c term 1.4.uf22", 0x2001, 0x1000, CRC(52ffe01f) SHA1(683aa71c2eb17b7ad639b888487db73d7684901a) )
152   ROM_LOAD16_BYTE( "210278 804k even eaf4 term 1.4.ue21", 0x4000, 0x1000, CRC(7fe326db) SHA1(d39d05e008160fb8afa62e0d4cfb1d813f2296d4) )
153   ROM_LOAD16_BYTE( "210279 804k odd 3f6d term 1.4.uf21", 0x4001, 0x1000, CRC(6c12d81c) SHA1(efe7c20e567c02b9c5b66a2d18e035d5f5f56b28) )
154   ROM_LOAD16_BYTE( "210280 806k even 679d term 1.4.ue20", 0x6000, 0x1000, CRC(70930d74) SHA1(a5ab1c0bd8bd829408961107e01598cd71a97fec) )
155   ROM_LOAD16_BYTE( "210281 1.4 806k odd sum 611e.uf20", 0x6001, 0x1000, CRC(8080aa2a) SHA1(c018a23e6f2158e2d63723cade0a3ad737090921) )
156   ROM_LOAD16_BYTE( "su7700 210282 808k even opmod term 1.4 sum 2550.ue18", 0x8000, 0x1000, CRC(8f5834cd) SHA1(3cd03c82aa85c30cbc8e954f5a9fc4e9034f913b) )
157   ROM_LOAD16_BYTE( "su7700 210283 808k odd opmod term 1.4 sum faca.uf18", 0x8001, 0x1000, CRC(e593b133) SHA1(6c641df844706e0d990b5fd544e98594171080a1) )
158   ROM_LOAD16_BYTE( "210258 80ak even b2f6 mon 1.3.ue15", 0xa000, 0x1000, CRC(ec5a1250) SHA1(ffef73d35f172ac610b35bdf729d51eb6f9346ba) )
159   ROM_LOAD16_BYTE( "210259 80ak odd cd66 mon 1.3.uf15", 0xa001, 0x1000, CRC(61eb43c6) SHA1(baaae0b787798147da453aac1f815589ea4ed921) )
160   ROM_LOAD16_BYTE( "210244 80c even ce40 dos 1.6b.ue13", 0xc000, 0x1000, CRC(3b64e4cb) SHA1(71b28d160b101ea6165e602ff1c54272b7b30ece) )
161   ROM_LOAD16_BYTE( "210245 80c odd 1ac3 dos 1.6b.uf13", 0xc001, 0x1000, CRC(0b6539ca) SHA1(d49e6d3307e5d634a412fd80b59492f31e29f7e0) )     
162   ROM_LOAD16_BYTE( "210290 idris even rel3 sum 0cce.ue12", 0xe000, 0x1000, CRC(07065772) SHA1(620ea5d55021e5c38efc010722ddbd852cd49e39) )
163   ROM_LOAD16_BYTE( "210291 idris odd rel3 sum 5d11.uf12", 0xe001, 0x1000, CRC(d81b30da) SHA1(228f9b4e39d430ce4aaa81ea63f4516a51e6d001) )
308   ROM_LOAD16_BYTE( "210274 800k even a3ee term 1.4.ue24",                  0x0000, 0x1000, CRC(5fa8f368) SHA1(120dbcfedce0badd38bf5b23e1fbc99667eb286c) )
309   ROM_LOAD16_BYTE( "210275 800k odd bbb3 term 1.4.uf24",                  0x0001, 0x1000, CRC(4d479457) SHA1(5fa96a1eadfd9ba493d28691286e2e001a489a19) )
310   ROM_LOAD16_BYTE( "210276 802k even 0c22 term 1.4.ue22",                  0x2000, 0x1000, CRC(c88c44ec) SHA1(f39d8a3cf7aaefd815b4426348965b076c1f2265) )
311   ROM_LOAD16_BYTE( "210277 802k odd b58c term 1.4.uf22",                  0x2001, 0x1000, CRC(52ffe01f) SHA1(683aa71c2eb17b7ad639b888487db73d7684901a) )
312   ROM_LOAD16_BYTE( "210278 804k even eaf4 term 1.4.ue21",                  0x4000, 0x1000, CRC(7fe326db) SHA1(d39d05e008160fb8afa62e0d4cfb1d813f2296d4) )
313   ROM_LOAD16_BYTE( "210279 804k odd 3f6d term 1.4.uf21",                  0x4001, 0x1000, CRC(6c12d81c) SHA1(efe7c20e567c02b9c5b66a2d18e035d5f5f56b28) )
314   ROM_LOAD16_BYTE( "210280 806k even 679d term 1.4.ue20",                  0x6000, 0x1000, CRC(70930d74) SHA1(a5ab1c0bd8bd829408961107e01598cd71a97fec) )
315   ROM_LOAD16_BYTE( "210281 1.4 806k odd sum 611e.uf20",                  0x6001, 0x1000, CRC(8080aa2a) SHA1(c018a23e6f2158e2d63723cade0a3ad737090921) )
316   ROM_LOAD16_BYTE( "su7700 210282 808k even opmod term 1.4 sum 2550.ue18",   0x8000, 0x1000, CRC(8f5834cd) SHA1(3cd03c82aa85c30cbc8e954f5a9fc4e9034f913b) )
317   ROM_LOAD16_BYTE( "su7700 210283 808k odd opmod term 1.4 sum faca.uf18",      0x8001, 0x1000, CRC(e593b133) SHA1(6c641df844706e0d990b5fd544e98594171080a1) )
318   ROM_LOAD16_BYTE( "210258 80ak even b2f6 mon 1.3.ue15",                  0xa000, 0x1000, CRC(ec5a1250) SHA1(ffef73d35f172ac610b35bdf729d51eb6f9346ba) )
319   ROM_LOAD16_BYTE( "210259 80ak odd cd66 mon 1.3.uf15",                  0xa001, 0x1000, CRC(61eb43c6) SHA1(baaae0b787798147da453aac1f815589ea4ed921) )
320   ROM_LOAD16_BYTE( "210244 80c even ce40 dos 1.6b.ue13",                  0xc000, 0x1000, CRC(3b64e4cb) SHA1(71b28d160b101ea6165e602ff1c54272b7b30ece) )
321   ROM_LOAD16_BYTE( "210245 80c odd 1ac3 dos 1.6b.uf13",                  0xc001, 0x1000, CRC(0b6539ca) SHA1(d49e6d3307e5d634a412fd80b59492f31e29f7e0) )     
322   ROM_LOAD16_BYTE( "210290 idris even rel3 sum 0cce.ue12",               0xe000, 0x1000, CRC(07065772) SHA1(620ea5d55021e5c38efc010722ddbd852cd49e39) )
323   ROM_LOAD16_BYTE( "210291 idris odd rel3 sum 5d11.uf12",                  0xe001, 0x1000, CRC(d81b30da) SHA1(228f9b4e39d430ce4aaa81ea63f4516a51e6d001) )
324
325   ROM_REGION( 0x800, "i8035", 0 )
326   ROM_LOAD( "keyboard controller i8035", 0x0000, 0x0800, NO_DUMP )
164327   
165328   ROM_REGION( 0x800, "gfx1", 0 )
166   ROM_LOAD( "norm chrset 4b40.ua13", 0x0000, 0x0400, CRC(55eb7b87) SHA1(768cea80597e7396d9e26f8cd09e6b480a526fce) )
167   ROM_LOAD( "alt 46a7.ua14",  0x0400, 0x0400, CRC(be22b7e4) SHA1(83ef252c7fab33b4d3821a3049b89d044df35de8) )
329   ROM_LOAD( "norm chrset 4b40.ua13",   0x0000, 0x0400, CRC(55eb7b87) SHA1(768cea80597e7396d9e26f8cd09e6b480a526fce) )
330   ROM_LOAD( "alt 46a7.ua14",         0x0400, 0x0400, CRC(be22b7e4) SHA1(83ef252c7fab33b4d3821a3049b89d044df35de8) )
168331
169332   ROM_REGION( 0x20, "proms", 0 )
170   ROM_LOAD( "rp0a.ub8", 0x0000, 0x0020, NO_DUMP )
171   ROM_LOAD( "rp1a.ub7", 0x0000, 0x0020, NO_DUMP )
172   ROM_LOAD( "rp2a.ub9", 0x0000, 0x0020, NO_DUMP )
173   ROM_LOAD( "ha-5.ub1", 0x0000, 0x0020, NO_DUMP )
333   ROM_LOAD( "rp0a.ub8",  0x0000, 0x0020, NO_DUMP )
334   ROM_LOAD( "rp1a.ub7",  0x0000, 0x0020, NO_DUMP )
335   ROM_LOAD( "rp2a.ub9",  0x0000, 0x0020, NO_DUMP )
336   ROM_LOAD( "ha-5.ub1",  0x0000, 0x0020, NO_DUMP )
174337   ROM_LOAD( "03c0.ua16", 0x0000, 0x0020, NO_DUMP )
175338   ROM_LOAD( "03c0.ua11", 0x0000, 0x0020, NO_DUMP )
176339ROM_END
177340
178/* Driver */
341/***************************************************************************
342    SYSTEM DRIVERS
343***************************************************************************/
179344
180345/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */
181346COMP( 1980, cgc7900,  0,       0,    cgc7900,    cgc7900,     0,   "Chromatics",   "CGC 7900",      GAME_NOT_WORKING)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team