Previous 15994 Revisions Next

r10617 Monday 28th February, 2011 at 16:32:31 UTC by Miodrag Milanović
VGA is now in one file, made visible only used calls.
[src/mess]mess.mak
[src/mess/drivers]at.c bebox.c pc.c
[src/mess/machine]pc.c
[src/mess/video]pc_vga_mess.c pc_vga_mess.h pc_video_mess.c pc_video_mess.h

src/mess/machine/pc.c
r10616r10617
2020#include "machine/pic8259.h"
2121#include "machine/pc_turbo.h"
2222
23#include "video/pc_video_mess.h"
2423#include "video/pc_vga.h"
2524#include "video/pc_cga.h"
2625#include "video/pc_mda.h"
src/mess/video/pc_video_mess.c
r10616r10617
1/*********************************************************************
2
3    pc_video.c
4
5    PC Video code
6
7*********************************************************************/
8
9#include "emu.h"
10#include "memconv.h"
11#include "includes/crtc6845.h"
12#include "video/pc_video_mess.h"
13
14
15
16/***************************************************************************
17
18    Local variables
19
20***************************************************************************/
21
22size_t pc_videoram_size;
23UINT8 *pc_videoram;
24
25static pc_video_update_proc (*pc_choosevideomode)(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc);
26static struct mscrtc6845 *pc_crtc;
27static int pc_anythingdirty;
28static int pc_current_height;
29static int pc_current_width;
30static const UINT16 dummy_palette[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
31
32
33
34/**************************************************************************/
35
36static STATE_POSTLOAD( pc_video_postload )
37{
38   pc_anythingdirty = 1;
39   pc_current_height = -1;
40   pc_current_width = -1;
41}
42
43
44
45struct mscrtc6845 *pc_video_start(running_machine *machine, const struct mscrtc6845_config *config,
46   pc_video_update_proc (*choosevideomode)(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc),
47   size_t vramsize)
48{
49   pc_choosevideomode = choosevideomode;
50   pc_crtc = NULL;
51   pc_anythingdirty = 1;
52   pc_current_height = -1;
53   pc_current_width = -1;
54   machine->generic.tmpbitmap = NULL;
55
56   pc_videoram_size = vramsize;
57   if (config)
58   {
59      pc_crtc = mscrtc6845_init(machine, config);
60      if (!pc_crtc)
61         return NULL;
62   }
63
64   if (pc_videoram_size)
65   {
66      video_start_generic_bitmapped(machine);
67   }
68
69   machine->state().register_postload(pc_video_postload, NULL);
70   return pc_crtc;
71}
72
73
74
75SCREEN_UPDATE( pc_video )
76{
77   UINT32 rc = 0;
78   int w = 0, h = 0;
79   pc_video_update_proc video_update;
80
81   if (pc_crtc)
82   {
83      w = mscrtc6845_get_char_columns(pc_crtc);
84      h = mscrtc6845_get_char_height(pc_crtc) * mscrtc6845_get_char_lines(pc_crtc);
85   }
86
87   video_update = pc_choosevideomode(screen->machine, &w, &h, pc_crtc);
88
89   if (video_update)
90   {
91      if ((pc_current_width != w) || (pc_current_height != h))
92      {
93         int width = screen->width();
94         int height = screen->height();
95
96         pc_current_width = w;
97         pc_current_height = h;
98         pc_anythingdirty = 1;
99
100         if (pc_current_width > width)
101            pc_current_width = width;
102         if (pc_current_height > height)
103            pc_current_height = height;
104
105         if ((pc_current_width > 100) && (pc_current_height > 100))
106            screen->set_visible_area(0, pc_current_width-1, 0, pc_current_height-1);
107
108         bitmap_fill(bitmap, cliprect, 0);
109      }
110
111      video_update(screen->machine->generic.tmpbitmap ? screen->machine->generic.tmpbitmap : bitmap, pc_crtc);
112
113      if (screen->machine->generic.tmpbitmap)
114      {
115         copybitmap(bitmap, screen->machine->generic.tmpbitmap, 0, 0, 0, 0, cliprect);
116         if (!pc_anythingdirty)
117            rc = UPDATE_HAS_NOT_CHANGED;
118         pc_anythingdirty = 0;
119      }
120   }
121   return rc;
122}
123
124
125
126WRITE8_HANDLER ( pc_video_videoram_w )
127{
128   UINT8 *videoram = pc_videoram;
129   if (videoram && videoram[offset] != data)
130   {
131      videoram[offset] = data;
132      pc_anythingdirty = 1;
133   }
134}
135
136
137WRITE16_HANDLER( pc_video_videoram16le_w ) { write16le_with_write8_handler(pc_video_videoram_w, space, offset, data, mem_mask); }
138
139WRITE32_HANDLER( pc_video_videoram32_w )
140{
141   UINT32 *videoram = (UINT32 *)pc_videoram;
142   COMBINE_DATA(videoram + offset);
143   pc_anythingdirty = 1;
144}
src/mess/video/pc_video_mess.h
r10616r10617
1/*********************************************************************
2
3    pc_video.h
4
5    Refactoring of code common to PC video implementations
6
7*********************************************************************/
8
9#ifndef PC_VIDEO_H
10#define PC_VIDEO_H
11
12#include "includes/crtc6845.h"
13
14extern size_t pc_videoram_size;
15extern UINT8 *pc_videoram;
16
17typedef void (*pc_video_update_proc)(bitmap_t *bitmap,
18   struct mscrtc6845 *crtc);
19
20struct mscrtc6845 *pc_video_start(running_machine *machine, const struct mscrtc6845_config *config,
21   pc_video_update_proc (*choosevideomode)(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc),
22   size_t vramsize);
23
24SCREEN_UPDATE( pc_video );
25
26WRITE8_HANDLER( pc_video_videoram_w );
27WRITE16_HANDLER( pc_video_videoram16le_w );
28WRITE32_HANDLER( pc_video_videoram32_w );
29
30#endif /* PC_VIDEO_H */
src/mess/video/pc_vga_mess.c
r10616r10617
3030
3131#include "emu.h"
3232#include "pc_vga_mess.h"
33#include "pc_video_mess.h"
34
3533#include "includes/crtc6845.h"
3634#include "memconv.h"
3735
3836/***************************************************************************
3937
38    Local variables
39
40***************************************************************************/
41
42static size_t pc_videoram_size;
43static UINT8 *pc_videoram;
44
45static pc_video_update_proc (*pc_choosevideomode)(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc);
46static struct mscrtc6845 *pc_crtc;
47static int pc_anythingdirty;
48static int pc_current_height;
49static int pc_current_width;
50/***************************************************************************
51
4052    Static declarations
4153
4254***************************************************************************/
r10616r10617
4456#define LOG_ACCESSES   0
4557#define LOG_REGISTERS   0
4658
47static PALETTE_INIT( ega );
4859static PALETTE_INIT( vga );
49static VIDEO_START( ega );
5060static VIDEO_START( vga );
51static VIDEO_RESET( ega );
5261static VIDEO_RESET( vga );
5362
5463static pc_video_update_proc pc_vga_choosevideomode(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc);
55static pc_video_update_proc pc_ega_choosevideomode(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc);
5664
5765/***************************************************************************
5866
r10616r10617
6169***************************************************************************/
6270
6371/* grabbed from dac inited by et4000 bios */
64static const unsigned char ega_palette[] =
65{
66   0x00, 0x00, 0x00,
67   0x00, 0x00, 0xa8,
68   0x00, 0xa8, 0x00,
69   0x00, 0xa8, 0xa8,
70   0xa8, 0x00, 0x00,
71   0xa8, 0x00, 0xa8,
72   0xa8, 0x54, 0x00,
73   0xa8, 0xa8, 0xa8,
74   0x00, 0x00, 0x00,
75   0x00, 0x00, 0xa8,
76   0x00, 0xa8, 0x00,
77   0x00, 0xa8, 0xa8,
78   0xa8, 0x00, 0x00,
79   0xa8, 0x00, 0xa8,
80   0xa8, 0x54, 0x00,
81   0xa8, 0xa8, 0xa8,
82   0x54, 0x54, 0x54,
83   0x54, 0x54, 0xfc,
84   0x54, 0xfc, 0x54,
85   0x54, 0xfc, 0xfc,
86   0xfc, 0x54, 0x54,
87   0xfc, 0x54, 0xfc,
88   0xfc, 0xfc, 0x54,
89   0xfc, 0xfc, 0xfc,
90   0x54, 0x54, 0x54,
91   0x54, 0x54, 0xfc,
92   0x54, 0xfc, 0x54,
93   0x54, 0xfc, 0xfc,
94   0xfc, 0x54, 0x54,
95   0xfc, 0x54, 0xfc,
96   0xfc, 0xfc, 0x54,
97   0xfc, 0xfc, 0xfc,
98   0x00, 0x00, 0x00,
99   0x00, 0x00, 0xa8,
100   0x00, 0xa8, 0x00,
101   0x00, 0xa8, 0xa8,
102   0xa8, 0x00, 0x00,
103   0xa8, 0x00, 0xa8,
104   0xa8, 0x54, 0x00,
105   0xa8, 0xa8, 0xa8,
106   0x00, 0x00, 0x00,
107   0x00, 0x00, 0xa8,
108   0x00, 0xa8, 0x00,
109   0x00, 0xa8, 0xa8,
110   0xa8, 0x00, 0x00,
111   0xa8, 0x00, 0xa8,
112   0xa8, 0x54, 0x00,
113   0xa8, 0xa8, 0xa8,
114   0x54, 0x54, 0x54,
115   0x54, 0x54, 0xfc,
116   0x54, 0xfc, 0x54,
117   0x54, 0xfc, 0xfc,
118   0xfc, 0x54, 0x54,
119   0xfc, 0x54, 0xfc,
120   0xfc, 0xfc, 0x54,
121   0xfc, 0xfc, 0xfc,
122   0x54, 0x54, 0x54,
123   0x54, 0x54, 0xfc,
124   0x54, 0xfc, 0x54,
125   0x54, 0xfc, 0xfc,
126   0xfc, 0x54, 0x54,
127   0xfc, 0x54, 0xfc,
128   0xfc, 0xfc, 0x54,
129   0xfc, 0xfc, 0xfc
130};
13172
13273static const unsigned short vga_colortable[] =
13374{
r10616r10617
15091    15, 0,15, 1,15, 2,15, 3,15, 4,15, 5,15, 6,15, 7,15, 8,15, 9,15,10,15,11,15,12,15,13,15,14,15,15
15192};
15293
153MACHINE_CONFIG_FRAGMENT( pcvideo_vga )
154   MCFG_SCREEN_ADD("screen", RASTER)
155   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
156   MCFG_SCREEN_SIZE(720, 480)
157   MCFG_SCREEN_VISIBLE_AREA(0,720-1, 0,480-1)
158   MCFG_PALETTE_LENGTH(0x100)
159   MCFG_SCREEN_UPDATE(pc_video)
160   MCFG_PALETTE_INIT(vga)
94static STATE_POSTLOAD( pc_video_postload )
95{
96   pc_anythingdirty = 1;
97   pc_current_height = -1;
98   pc_current_width = -1;
99}
161100
162   MCFG_VIDEO_START(vga)
163   MCFG_VIDEO_RESET(vga)
164MACHINE_CONFIG_END
165101
166MACHINE_CONFIG_FRAGMENT( pcvideo_pc1640 )
167   MCFG_SCREEN_ADD("screen", RASTER)
168   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
169   MCFG_SCREEN_SIZE(720, 350)
170   MCFG_SCREEN_VISIBLE_AREA(0,720-1, 0,350-1)
171   MCFG_SCREEN_UPDATE(pc_video)
172102
173   MCFG_PALETTE_LENGTH(sizeof(ega_palette) / 3)
174   MCFG_PALETTE_INIT(ega)
103struct mscrtc6845 *pc_video_start(running_machine *machine, const struct mscrtc6845_config *config,
104   pc_video_update_proc (*choosevideomode)(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc),
105   size_t vramsize)
106{
107   pc_choosevideomode = choosevideomode;
108   pc_crtc = NULL;
109   pc_anythingdirty = 1;
110   pc_current_height = -1;
111   pc_current_width = -1;
112   machine->generic.tmpbitmap = NULL;
175113
176   MCFG_VIDEO_START(ega)
177   MCFG_VIDEO_RESET(ega)
178MACHINE_CONFIG_END
114   pc_videoram_size = vramsize;
115   if (config)
116   {
117      pc_crtc = mscrtc6845_init(machine, config);
118      if (!pc_crtc)
119         return NULL;
120   }
179121
180/***************************************************************************/
122   if (pc_videoram_size)
123   {
124      video_start_generic_bitmapped(machine);
125   }
181126
182static PALETTE_INIT( ega )
127   machine->state().register_postload(pc_video_postload, NULL);
128   return pc_crtc;
129}
130
131
132
133SCREEN_UPDATE( pc_video )
183134{
184   int i;
135   UINT32 rc = 0;
136   int w = 0, h = 0;
137   pc_video_update_proc video_update;
185138
186   for ( i = 0; i < sizeof(ega_palette) / 3; i++ ) {
187      palette_set_color_rgb(machine, i, ega_palette[i*3], ega_palette[i*3+1], ega_palette[i*3+2]);
139   if (pc_crtc)
140   {
141      w = mscrtc6845_get_char_columns(pc_crtc);
142      h = mscrtc6845_get_char_height(pc_crtc) * mscrtc6845_get_char_lines(pc_crtc);
188143   }
144
145   video_update = pc_choosevideomode(screen->machine, &w, &h, pc_crtc);
146
147   if (video_update)
148   {
149      if ((pc_current_width != w) || (pc_current_height != h))
150      {
151         int width = screen->width();
152         int height = screen->height();
153
154         pc_current_width = w;
155         pc_current_height = h;
156         pc_anythingdirty = 1;
157
158         if (pc_current_width > width)
159            pc_current_width = width;
160         if (pc_current_height > height)
161            pc_current_height = height;
162
163         if ((pc_current_width > 100) && (pc_current_height > 100))
164            screen->set_visible_area(0, pc_current_width-1, 0, pc_current_height-1);
165
166         bitmap_fill(bitmap, cliprect, 0);
167      }
168
169      video_update(screen->machine->generic.tmpbitmap ? screen->machine->generic.tmpbitmap : bitmap, pc_crtc);
170
171      if (screen->machine->generic.tmpbitmap)
172      {
173         copybitmap(bitmap, screen->machine->generic.tmpbitmap, 0, 0, 0, 0, cliprect);
174         if (!pc_anythingdirty)
175            rc = UPDATE_HAS_NOT_CHANGED;
176         pc_anythingdirty = 0;
177      }
178   }
179   return rc;
189180}
190181
182
183
184WRITE8_HANDLER ( pc_video_videoram_w )
185{
186   UINT8 *videoram = pc_videoram;
187   if (videoram && videoram[offset] != data)
188   {
189      videoram[offset] = data;
190      pc_anythingdirty = 1;
191   }
192}
193
194
195WRITE16_HANDLER( pc_video_videoram16le_w ) { write16le_with_write8_handler(pc_video_videoram_w, space, offset, data, mem_mask); }
196
197WRITE32_HANDLER( pc_video_videoram32_w )
198{
199   UINT32 *videoram = (UINT32 *)pc_videoram;
200   COMBINE_DATA(videoram + offset);
201   pc_anythingdirty = 1;
202}
203/***************************************************************************/
204
191205static PALETTE_INIT( vga )
192206{
193207   int i;
r10616r10617
312326
313327
314328
315static int ega_get_clock(void)
316{
317   int clck=0;
318   switch(vga.miscellaneous_output&0xc) {
319   case 0: clck=14000000;break;
320   case 4: clck=16000000;break;
321   /* case 8: external */
322   /* case 0xc: reserved */
323   }
324   if (vga.sequencer.data[1]&8) clck/=2;
325   return clck;
326}
327
328329static int vga_get_clock(void)
329330{
330331   int clck=0;
r10616r10617
338339   return clck;
339340}
340341
341static int ega_get_crtc_columns(void) /* in clocks! */
342{
343   int columns=vga.crtc.data[0]+2;
344   if (!GRAPHIC_MODE) {
345      columns*=CHAR_WIDTH;
346   } else {
347      columns*=8;
348   }
349   return columns;
350}
351
352static int ega_get_crtc_lines(void)
353{
354   int lines=vga.crtc.data[6]|((vga.crtc.data[7]&1));
355
356   return lines;
357}
358
359342static int vga_get_crtc_columns(void) /* in clocks! */
360343{
361344   int columns=vga.crtc.data[0]+5;
r10616r10617
829812   return data;
830813}
831814
832
833
834READ8_HANDLER( ega_port_03c0_r )
835{
836   UINT8 data = 0xff;
837   switch (offset) {
838   case 2: data=0xff;/*!*/break;
839   }
840   return data;
841}
842
843815READ8_HANDLER( vga_port_03c0_r )
844816{
845817   UINT8 data = 0xff;
r10616r10617
10901062      vga_crtc_w(space, offset, data);
10911063}
10921064
1093
1094
1095READ8_HANDLER( paradise_ega_03c0_r )
1096{
1097   UINT8 data = vga_port_03c0_r(space, offset);
1098
1099   if (offset == 2)
1100   {
1101      if ( (vga.feature_control&3)==2 ) {
1102         data=(data&~0x60)|((vga.vga_intf.read_dipswitch(space, 0)&0xc0)>>1);
1103      } else if ((vga.feature_control&3)==1 ) {
1104         data=(data&~0x60)|((vga.vga_intf.read_dipswitch(space, 0)&0x30)<<1);
1105      }
1106   }
1107   return data;
1108}
1109
1110
1111
11121065void pc_vga_reset(running_machine *machine)
11131066{
11141067   /* clear out the VGA structure */
r10616r10617
12721225{
12731226   vga.monitor.retrace=1;
12741227}
1275
1276static VIDEO_START( ega )
1277{
1278   vga.monitor.get_clock = ega_get_clock;
1279   vga.monitor.get_lines = ega_get_crtc_lines;
1280   vga.monitor.get_columns = ega_get_crtc_columns;
1281   vga.monitor.get_sync_lines = vga_get_crtc_sync_lines;
1282   vga.monitor.get_sync_columns = vga_get_crtc_sync_columns;
1283   machine->scheduler().timer_pulse(attotime::from_hz(60), FUNC(vga_timer));
1284   pc_video_start(machine, NULL, pc_ega_choosevideomode, 0);
1285}
1286
1287static VIDEO_RESET( ega )
1288{
1289}
1290
12911228static VIDEO_START( vga )
12921229{
12931230   vga.monitor.get_clock=vga_get_clock;
r10616r10617
14741411   }
14751412}
14761413
1477static pc_video_update_proc pc_ega_choosevideomode(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc)
1478{
1479   pc_video_update_proc proc = NULL;
1480   int i;
1481
1482   if (CRTC_ON)
1483   {
1484      for (i = 0; i < 16; i++)
1485         vga.pens[i]=machine->pens[i/*vga.attribute.data[i]&0x3f*/];
1486
1487      if (!GRAPHIC_MODE)
1488      {
1489         proc = vga_vh_text;
1490         *height = TEXT_LINES;
1491         *width = TEXT_COLUMNS*CHAR_WIDTH;
1492      }
1493      else
1494      {
1495         proc = vga_vh_ega;
1496         *height = LINES;
1497         *width = EGA_COLUMNS*8;
1498      }
1499   }
1500   return proc;
1501}
1502
15031414static pc_video_update_proc pc_vga_choosevideomode(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc)
15041415{
15051416   pc_video_update_proc proc = NULL;
r10616r10617
15771488   return vga.svga_intf.vram_size;
15781489}
15791490
1580READ16_HANDLER( paradise_ega16le_03c0_r ) { return read16le_with_read8_handler(paradise_ega_03c0_r, space, offset, mem_mask); }
1491MACHINE_CONFIG_FRAGMENT( pcvideo_vga )
1492   MCFG_SCREEN_ADD("screen", RASTER)
1493   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1494   MCFG_SCREEN_SIZE(720, 480)
1495   MCFG_SCREEN_VISIBLE_AREA(0,720-1, 0,480-1)
1496   MCFG_SCREEN_UPDATE(pc_video)
1497   MCFG_SCREEN_REFRESH_RATE(60)
1498   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
1499   
1500   MCFG_PALETTE_LENGTH(0x100)
1501   MCFG_PALETTE_INIT(vga)
1502
1503   MCFG_VIDEO_START(vga)
1504   MCFG_VIDEO_RESET(vga)
1505MACHINE_CONFIG_END
src/mess/video/pc_vga_mess.h
r10616r10617
99#ifndef PC_VGA_H
1010#define PC_VGA_H
1111
12#include "osdepend.h"
13#include "pc_video_mess.h"
12typedef void (*pc_video_update_proc)(bitmap_t *bitmap,
13   struct mscrtc6845 *crtc);
1414
15struct mscrtc6845 *pc_video_start(running_machine *machine, const struct mscrtc6845_config *config,
16   pc_video_update_proc (*choosevideomode)(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc),
17   size_t vramsize);
18
1519MACHINE_CONFIG_EXTERN( pcvideo_vga );
16MACHINE_CONFIG_EXTERN( pcvideo_pc1640 );
1720
1821struct pc_vga_interface
1922{
r10616r10617
4346void *pc_vga_memory(void);
4447size_t pc_vga_memory_size(void);
4548
46READ8_HANDLER( ega_port_03c0_r );
47
48READ8_HANDLER( paradise_ega_03c0_r );
49READ16_HANDLER( paradise_ega16le_03c0_r );
50
51READ8_HANDLER( vga_port_03b0_r );
52READ8_HANDLER( vga_port_03c0_r );
5349READ8_HANDLER( vga_port_03d0_r );
54WRITE8_HANDLER( vga_port_03b0_w );
55WRITE8_HANDLER( vga_port_03c0_w );
56WRITE8_HANDLER( vga_port_03d0_w );
57
58READ16_HANDLER( vga_port16le_03b0_r );
59READ16_HANDLER( vga_port16le_03c0_r );
60READ16_HANDLER( vga_port16le_03d0_r );
61WRITE16_HANDLER( vga_port16le_03b0_w );
62WRITE16_HANDLER( vga_port16le_03c0_w );
63WRITE16_HANDLER( vga_port16le_03d0_w );
64
6550/*
6651  pega notes (paradise)
6752  build in amstrad pc1640
src/mess/mess.mak
r10616r10617
12911291   $(MESS_MACHINE)/pc_hdc.o   \
12921292   $(MESS_MACHINE)/pc_joy.o   \
12931293   $(MESS_MACHINE)/kb_keytro.o   \
1294   $(MESS_VIDEO)/pc_video_mess.o   \
12951294   $(MESS_VIDEO)/pc_mda.o      \
12961295   $(MESS_VIDEO)/pc_cga.o      \
12971296   $(MESS_VIDEO)/cgapal.o      \
src/mess/drivers/at.c
r10616r10617
5151#include "sound/speaker.h"
5252#include "sound/saa1099.h"
5353#include "machine/ram.h"
54
54#include "machine/nvram.h"
5555#include "memconv.h"
5656
5757
r10616r10617
8181
8282static ADDRESS_MAP_START( at16_map, ADDRESS_SPACE_PROGRAM, 16 )
8383   AM_RANGE(0x000000, 0x09ffff) AM_MIRROR(0xff000000) AM_RAMBANK("bank10")
84//  AM_RANGE(0x0a0000, 0x0bffff) AM_READWRITE(SMH_RAM, pc_video_videoram16le_w) AM_BASE((UINT16 **)&videoram) AM_SIZE(&videoram_size)
8584   AM_RANGE(0x0c0000, 0x0c7fff) AM_ROM
8685   AM_RANGE(0x0c8000, 0x0cffff) AM_ROM
8786   AM_RANGE(0x0d0000, 0x0effff) AM_RAM
r10616r10617
9594   ADDRESS_MAP_GLOBAL_MASK(0x00ffffff)
9695   AM_RANGE(0x00000000, 0x0009ffff) AM_RAMBANK("bank10")
9796   AM_RANGE(0x000a0000, 0x000bffff) AM_NOP
98//  AM_RANGE(0x000b8000, 0x000bffff) AM_READWRITE(SMH_RAM, pc_video_videoram32_w) AM_BASE((UINT32 **) &videoram) AM_SIZE(&videoram_size)
9997   AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM
10098   AM_RANGE(0x000c8000, 0x000cffff) AM_ROM
10199   AM_RANGE(0x000d0000, 0x000effff) AM_ROM
r10616r10617
107105static ADDRESS_MAP_START( at586_map, ADDRESS_SPACE_PROGRAM, 32 )
108106   AM_RANGE(0x00000000, 0x0009ffff) AM_RAMBANK("bank10")
109107   AM_RANGE(0x000a0000, 0x000bffff) AM_NOP
110//  AM_RANGE(0x000b8000, 0x000bffff) AM_READWRITE(SMH_RAM, pc_video_videoram32_w) AM_BASE((UINT32 **) &videoram) AM_SIZE(&videoram_size)
111108   AM_RANGE(0x00800000, 0x00800bff) AM_RAM AM_SHARE("nvram")
112109   AM_RANGE(0xfffe0000, 0xffffffff) AM_ROM AM_REGION("user1", 0x20000)
113110ADDRESS_MAP_END
r10616r10617
673670
674671   MCFG_FRAGMENT_ADD( pcvideo_vga )
675672
676   MCFG_SCREEN_MODIFY("screen")
677   MCFG_SCREEN_REFRESH_RATE(60)
678   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
679
680673   /* sound hardware */
681674   MCFG_SPEAKER_STANDARD_MONO("mono")
682675   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
r10616r10617
740733
741734   MCFG_FRAGMENT_ADD( pcvideo_vga )
742735
743   MCFG_SCREEN_MODIFY("screen")
744   MCFG_SCREEN_REFRESH_RATE(60)
745   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
746
747736   MCFG_MACHINE_START( at )
748737   MCFG_MACHINE_RESET( at )
749738
r10616r10617
816805
817806   MCFG_FRAGMENT_ADD( pcvideo_vga )
818807
819   MCFG_SCREEN_MODIFY("screen")
820   MCFG_SCREEN_REFRESH_RATE(60)
821   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
822
823808   /* sound hardware */
824809   MCFG_SPEAKER_STANDARD_MONO("mono")
825810   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
r10616r10617
842827   MCFG_KB_KEYTRONIC_ADD("keyboard", at_keytronic_intf)
843828
844829   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
845//  MCFG_NVRAM_ADD_0FILL("nvram")
830    MCFG_NVRAM_ADD_0FILL("nvram")
846831
847832   /* printers */
848833   MCFG_PC_LPT_ADD("lpt_0", at_lpt_config)
src/mess/drivers/bebox.c
r10616r10617
145145
146146   /* video hardware */
147147   MCFG_FRAGMENT_ADD( pcvideo_vga )
148   MCFG_SCREEN_MODIFY("screen")
149   MCFG_SCREEN_REFRESH_RATE(60)
150   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
151148
152149   MCFG_MACHINE_START( bebox )
153150   MCFG_MACHINE_RESET( bebox )
src/mess/drivers/pc.c
r10616r10617
23122312
23132313   /* video hardware */
23142314   MCFG_FRAGMENT_ADD( pcvideo_vga )
2315   MCFG_SCREEN_MODIFY("screen")
2316   MCFG_SCREEN_REFRESH_RATE(60)
2317   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
23182315
23192316   /* sound hardware */
23202317   MCFG_SPEAKER_STANDARD_MONO("mono")

Previous 15994 Revisions Next


© 1998-2018 The MESS Team