Previous 15994 Revisions Next

r2292 Sunday 6th April, 2008 at 03:14:47 UTC by Firewave
Yet more Machine -> machine and deprecat.h cleanups
[src/mess]inputx.c messopts.c
[src/mess/machine]at.c bebox.c pc.c
[src/mess/video]cirrus.c pc_vga.c pc_vga.h pc_video.c pc_video.h

src/mess/video/cirrus.c
r2291r2292
208208WRITE8_HANDLER( cirrus_42E8_w )
209209{
210210   if (data & 0x80)
211      pc_vga_reset();
211      pc_vga_reset(machine);
212212}
213213
214214
src/mess/video/pc_vga.c
r2291r2292
528528static WRITE64_HANDLER( vga_text64_w ) { write64be_with_write8_handler(vga_text_w, machine, offset, data, mem_mask); }
529529static WRITE64_HANDLER( vga_vga64_w ) { write64be_with_write8_handler(vga_vga_w, machine, offset, data, mem_mask); }
530530
531static void vga_cpu_interface(void)
531static void vga_cpu_interface(running_machine *machine)
532532{
533533   static int sequencer, gc;
534534   read8_machine_func read_handler;
r2291r2292
600600      }
601601   }
602602
603   buswidth = cputype_databus_width(Machine->config->cpu[0].type, ADDRESS_SPACE_PROGRAM);
603   buswidth = cputype_databus_width(machine->config->cpu[0].type, ADDRESS_SPACE_PROGRAM);
604604   switch(buswidth)
605605   {
606606      case 8:
r2291r2292
939939      if (vga.sequencer.index < vga.svga_intf.seq_regcount)
940940      {
941941         vga.sequencer.data[vga.sequencer.index] = data;
942         vga_cpu_interface();
942         vga_cpu_interface(machine);
943943
944944         if (vga.sequencer.index == 0)
945945            vga.monitor.start_time = timer_get_time();
r2291r2292
10041004      if (vga.gc.index < vga.svga_intf.gc_regcount)
10051005      {
10061006         vga.gc.data[vga.gc.index] = data;
1007         vga_cpu_interface();
1007         vga_cpu_interface(machine);
10081008      }
10091009      break;
10101010   }
r2291r2292
10401040
10411041
10421042
1043void pc_vga_reset(void)
1043void pc_vga_reset(running_machine *machine)
10441044{
10451045   /* clear out the VGA structure */
10461046   memset(vga.pens, 0, sizeof(vga.pens));
r2291r2292
10651065   the video memory area,
10661066   so I introduced the reset to switch to b8000 area */
10671067   vga.sequencer.data[4] = 0;
1068   vga_cpu_interface();
1068   vga_cpu_interface(machine);
10691069
10701070   vga.line_compare = 0x3ff;
10711071   // set CRTC register to match the line compare value
r2291r2292
10881088
10891089
10901090
1091void pc_vga_init(const struct pc_vga_interface *vga_intf, const struct pc_svga_interface *svga_intf)
1091void pc_vga_init(running_machine *machine, const struct pc_vga_interface *vga_intf, const struct pc_svga_interface *svga_intf)
10921092{
10931093   int i, j, k, mask, buswidth;
10941094
r2291r2292
11351135   memset(vga.crtc.data, '\0', vga.svga_intf.crtc_regcount);
11361136   memset(vga.gc.data, '\0', vga.svga_intf.gc_regcount);
11371137
1138   buswidth = cputype_databus_width(Machine->config->cpu[0].type, ADDRESS_SPACE_PROGRAM);
1138   buswidth = cputype_databus_width(machine->config->cpu[0].type, ADDRESS_SPACE_PROGRAM);
11391139   switch(buswidth)
11401140   {
11411141      case 8:
r2291r2292
11591159         break;
11601160   }
11611161
1162   pc_vga_reset();
1162   pc_vga_reset(machine);
11631163}
11641164
11651165static TIMER_CALLBACK(vga_timer)
r2291r2292
11751175   vga.monitor.get_sync_lines = vga_get_crtc_sync_lines;
11761176   vga.monitor.get_sync_columns = vga_get_crtc_sync_columns;
11771177   timer_pulse(ATTOTIME_IN_HZ(60), NULL, 0, vga_timer);
1178   pc_video_start(NULL, pc_ega_choosevideomode, 0);
1178   pc_video_start(machine, NULL, pc_ega_choosevideomode, 0);
11791179}
11801180
11811181static VIDEO_RESET( ega )
r2291r2292
11901190   vga.monitor.get_sync_lines=vga_get_crtc_sync_lines;
11911191   vga.monitor.get_sync_columns=vga_get_crtc_sync_columns;
11921192   timer_pulse(ATTOTIME_IN_HZ(60), NULL, 0, vga_timer);
1193   pc_video_start(NULL, pc_vga_choosevideomode, 0);
1193   pc_video_start(machine, NULL, pc_vga_choosevideomode, 0);
11941194}
11951195
11961196static VIDEO_RESET( vga )
11971197{
1198   pc_vga_reset();
1198   pc_vga_reset(machine);
11991199}
12001200
12011201static void vga_vh_text(bitmap_t *bitmap, struct mscrtc6845 *crtc)
src/mess/video/pc_vga.h
r2291r2292
3838   pc_video_update_proc (*choosevideomode)(const UINT8 *sequencer, const UINT8 *crtc, const UINT8 *gc, int *width, int *height);
3939};
4040
41void pc_vga_init(const struct pc_vga_interface *vga_intf, const struct pc_svga_interface *svga_intf);
42void pc_vga_reset(void);
41void pc_vga_init(running_machine *machine, const struct pc_vga_interface *vga_intf, const struct pc_svga_interface *svga_intf);
42void pc_vga_reset(running_machine *machine);
4343void *pc_vga_memory(void);
4444size_t pc_vga_memory_size(void);
4545
src/mess/video/pc_video.c
r2291r2292
77*********************************************************************/
88
99#include "driver.h"
10#include "deprecat.h"
1110#include "memconv.h"
1211#include "includes/crtc6845.h"
1312#include "video/pc_video.h"
r2291r2292
4039
4140
4241
43struct mscrtc6845 *pc_video_start(const struct mscrtc6845_config *config,
42struct mscrtc6845 *pc_video_start(running_machine *machine, const struct mscrtc6845_config *config,
4443   pc_video_update_proc (*choosevideomode)(int *width, int *height, struct mscrtc6845 *crtc),
4544   size_t vramsize)
4645{
r2291r2292
6261
6362   if (videoram_size)
6463   {
65      video_start_generic_bitmapped(Machine);
64      video_start_generic_bitmapped(machine);
6665   }
6766
6867   state_save_register_func_postload(pc_video_postload);
src/mess/video/pc_video.h
r2291r2292
1515typedef void (*pc_video_update_proc)(bitmap_t *bitmap,
1616   struct mscrtc6845 *crtc);
1717
18struct mscrtc6845 *pc_video_start(const struct mscrtc6845_config *config,
18struct mscrtc6845 *pc_video_start(running_machine *machine, const struct mscrtc6845_config *config,
1919   pc_video_update_proc (*choosevideomode)(int *width, int *height, struct mscrtc6845 *crtc),
2020   size_t vramsize);
2121
src/mess/inputx.c
r2291r2292
1010#include <assert.h>
1111#include <wctype.h>
1212#include "inputx.h"
13#include "deprecat.h"
1413#include "inptport.h"
1514#include "mame.h"
1615
src/mess/messopts.c
r2291r2292
77#include "mame.h"
88#include "options.h"
99#include "driver.h"
10#include "deprecat.h"
1110#include "pool.h"
1211#include "config.h"
1312#include "xmlfile.h"
src/mess/machine/at.c
r2291r2292
133133
134134   init_at_common(&at8042);
135135   pc_turbo_setup(0, 3, 0x02, 4.77/12, 1);
136   pc_vga_init(&vga_interface, NULL);
136   pc_vga_init(machine, &vga_interface, NULL);
137137}
138138
139139
r2291r2292
146146   };
147147   init_at_common(&at8042);
148148   pc_turbo_setup(0, 3, 0x02, 4.77/12, 1);
149   pc_vga_init(&vga_interface, NULL);
149   pc_vga_init(machine, &vga_interface, NULL);
150150}
151151
152152
src/mess/machine/bebox.c
r2291r2292
10161016   mc146818_init(MC146818_STANDARD);
10171017   pic8259_init(2, bebox_pic_set_int_line);
10181018   ide_controller_init_custom(0, &bebox_ide_interface, NULL);
1019   pc_vga_init(&bebox_vga_interface, &cirrus_svga_interface);
1019   pc_vga_init(machine, &bebox_vga_interface, &cirrus_svga_interface);
10201020   kbdc8042_init(&bebox_8042_interface);
10211021
10221022   dma8237_init(2);
src/mess/machine/pc.c
r2291r2292
358358
359359DRIVER_INIT( pc1640 )
360360{
361   pc_vga_init(&vga_interface, NULL);
361   pc_vga_init(machine, &vga_interface, NULL);
362362   memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0xa0000, 0xaffff, 0, 0, SMH_BANK1 );
363363   memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0xb0000, 0xb7fff, 0, 0, SMH_BANK2 );
364364   memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0xb8000, 0xbffff, 0, 0, SMH_BANK3 );
r2291r2292
388388   mess_init_pc_common(PCCOMMON_KEYBOARD_PC | PCCOMMON_DMA8237_PC | PCCOMMON_NEC765_RDY_NC);
389389   ppi8255_init(&pc_ppi8255_interface);
390390
391   pc_vga_init(&vga_interface, NULL);
391   pc_vga_init(machine, &vga_interface, NULL);
392392}
393393
394394static int pc_irq_callback(int irqline)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team