Previous 15994 Revisions Next

r2290 Sunday 6th April, 2008 at 02:54:42 UTC by Firewave
More Machine -> machine cleanups
[src/mess/machine]mc10.c
[src/mess/video]apf.c atom.c coco.c coco3.c m6847.c m6847.h vtech1.c

src/mess/video/coco.c
r2289r2290
7878   cfg.horizontal_sync_callback = coco_horizontal_sync_callback;
7979   cfg.field_sync_callback = coco_field_sync_callback;
8080
81   m6847_init(&cfg);
81   m6847_init(machine, &cfg);
8282}
8383
8484
src/mess/video/m6847.c
r2289r2290
6565
6666#include "driver.h"
6767#include "m6847.h"
68#include "deprecat.h"
6968
7069#ifdef ENABLE_DEBUGGER
7170#include "debug/debugcpu.h"
r2289r2290
18051804
18061805
18071806
1808void m6847_init(const m6847_config *cfg)
1807void m6847_init(running_machine *machine, const m6847_config *cfg)
18091808{
18101809   const m6847_variant *v;
18111810   UINT32 frequency;
r2289r2290
18701869   if (cfg->cpu0_timing_factor > 0)
18711870   {
18721871      cpu0_clock_period = period * cfg->cpu0_timing_factor * GROSS_FACTOR;
1873      cpunum_set_clock(Machine, 0, ATTOSECONDS_PER_SECOND / cpu0_clock_period);
1872      cpunum_set_clock(machine, 0, ATTOSECONDS_PER_SECOND / cpu0_clock_period);
18741873   }
18751874
18761875   /* calculate timing */
r2289r2290
19151914
19161915#ifdef ENABLE_DEBUGGER
19171916   /* setup debug commands */
1918   if (Machine->debug_mode)
1917   if (machine->debug_mode)
19191918      debug_console_register_command("m6847_dumpscanline", CMDFLAG_NONE, 0, 0, 0, execute_dumpscanline);
19201919#endif /* ENABLE_DEBUGGER */
19211920}
src/mess/video/m6847.h
r2289r2290
6464};
6565
6666/* creates a new M6847 instance */
67void m6847_init(const m6847_config *cfg);
67void m6847_init(running_machine *machine, const m6847_config *cfg);
6868
6969/* video update proc */
7070VIDEO_UPDATE(m6847);
src/mess/video/atom.c
r2289r2290
3737   cfg.type = M6847_VERSION_ORIGINAL_PAL;
3838   cfg.get_attributes = atom_get_attributes;
3939   cfg.get_video_ram = atom_get_video_ram;
40   m6847_init(&cfg);
40   m6847_init(machine, &cfg);
4141}
4242
src/mess/video/apf.c
r2289r2290
7373   cfg.field_sync_callback = apf_vsync_int;
7474   cfg.get_attributes = apf_get_attributes;
7575   cfg.get_video_ram = apf_get_video_ram;
76   m6847_init(&cfg);
76   m6847_init(machine, &cfg);
7777}
7878
7979VIDEO_UPDATE(apf)
src/mess/video/coco3.c
r2289r2290
784784
785785
786786
787static void internal_video_start_coco3(m6847_type type)
787static void internal_video_start_coco3(running_machine *machine, m6847_type type)
788788{
789789   int i;
790790   m6847_config cfg;
r2289r2290
833833   cfg.custom_palette = video->palette_colors;
834834   cfg.new_frame_callback = coco3_new_frame;
835835   cfg.custom_prepare_scanline = coco3_prepare_scanline;
836   m6847_init(&cfg);
836   m6847_init(machine, &cfg);
837837
838838   /* save state stuff */
839839   state_save_register_global_array(video->palette_ram);
r2289r2290
847847
848848VIDEO_START( coco3 )
849849{
850   internal_video_start_coco3(M6847_VERSION_GIME_NTSC);
850   internal_video_start_coco3(machine, M6847_VERSION_GIME_NTSC);
851851}
852852
853853VIDEO_START( coco3p )
854854{
855   internal_video_start_coco3(M6847_VERSION_GIME_PAL);
855   internal_video_start_coco3(machine, M6847_VERSION_GIME_PAL);
856856}
857857
858858
src/mess/video/vtech1.c
r2289r2290
9696}
9797
9898
99static void common_video_start(UINT32 *palette)
99static void common_video_start(running_machine *machine, UINT32 *palette)
100100{
101101   m6847_config cfg;
102102
r2289r2290
106106   cfg.get_video_ram = vtech1_get_video_ram;
107107   cfg.custom_palette = palette;
108108   cfg.field_sync_callback = vtech1_field_sync_callback;
109   m6847_init(&cfg);
109   m6847_init(machine, &cfg);
110110}
111111
112112
r2289r2290
124124        vtech1_palette_mono[i] = MAKE_RGB(mono, mono, mono);
125125   }
126126
127   common_video_start(vtech1_palette_mono);
127   common_video_start(machine, vtech1_palette_mono);
128128}
129129
130130
131131VIDEO_START( vtech1 )
132132{
133   common_video_start(NULL);
133   common_video_start(machine, NULL);
134134}
src/mess/machine/mc10.c
r2289r2290
212212   cfg.type = M6847_VERSION_ORIGINAL_NTSC;
213213   cfg.get_attributes = mc10_get_attributes;
214214   cfg.get_video_ram = mc10_get_video_ram;
215   m6847_init(&cfg);
215   m6847_init(machine, &cfg);
216216}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team