src/mess/video/m6847.c
| r2289 | r2290 | |
| 65 | 65 | |
| 66 | 66 | #include "driver.h" |
| 67 | 67 | #include "m6847.h" |
| 68 | | #include "deprecat.h" |
| 69 | 68 | |
| 70 | 69 | #ifdef ENABLE_DEBUGGER |
| 71 | 70 | #include "debug/debugcpu.h" |
| r2289 | r2290 | |
| 1805 | 1804 | |
| 1806 | 1805 | |
| 1807 | 1806 | |
| 1808 | | void m6847_init(const m6847_config *cfg) |
| 1807 | void m6847_init(running_machine *machine, const m6847_config *cfg) |
| 1809 | 1808 | { |
| 1810 | 1809 | const m6847_variant *v; |
| 1811 | 1810 | UINT32 frequency; |
| r2289 | r2290 | |
| 1870 | 1869 | if (cfg->cpu0_timing_factor > 0) |
| 1871 | 1870 | { |
| 1872 | 1871 | 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); |
| 1874 | 1873 | } |
| 1875 | 1874 | |
| 1876 | 1875 | /* calculate timing */ |
| r2289 | r2290 | |
| 1915 | 1914 | |
| 1916 | 1915 | #ifdef ENABLE_DEBUGGER |
| 1917 | 1916 | /* setup debug commands */ |
| 1918 | | if (Machine->debug_mode) |
| 1917 | if (machine->debug_mode) |
| 1919 | 1918 | debug_console_register_command("m6847_dumpscanline", CMDFLAG_NONE, 0, 0, 0, execute_dumpscanline); |
| 1920 | 1919 | #endif /* ENABLE_DEBUGGER */ |
| 1921 | 1920 | } |
src/mess/video/coco3.c
| r2289 | r2290 | |
| 784 | 784 | |
| 785 | 785 | |
| 786 | 786 | |
| 787 | | static void internal_video_start_coco3(m6847_type type) |
| 787 | static void internal_video_start_coco3(running_machine *machine, m6847_type type) |
| 788 | 788 | { |
| 789 | 789 | int i; |
| 790 | 790 | m6847_config cfg; |
| r2289 | r2290 | |
| 833 | 833 | cfg.custom_palette = video->palette_colors; |
| 834 | 834 | cfg.new_frame_callback = coco3_new_frame; |
| 835 | 835 | cfg.custom_prepare_scanline = coco3_prepare_scanline; |
| 836 | | m6847_init(&cfg); |
| 836 | m6847_init(machine, &cfg); |
| 837 | 837 | |
| 838 | 838 | /* save state stuff */ |
| 839 | 839 | state_save_register_global_array(video->palette_ram); |
| r2289 | r2290 | |
| 847 | 847 | |
| 848 | 848 | VIDEO_START( coco3 ) |
| 849 | 849 | { |
| 850 | | internal_video_start_coco3(M6847_VERSION_GIME_NTSC); |
| 850 | internal_video_start_coco3(machine, M6847_VERSION_GIME_NTSC); |
| 851 | 851 | } |
| 852 | 852 | |
| 853 | 853 | VIDEO_START( coco3p ) |
| 854 | 854 | { |
| 855 | | internal_video_start_coco3(M6847_VERSION_GIME_PAL); |
| 855 | internal_video_start_coco3(machine, M6847_VERSION_GIME_PAL); |
| 856 | 856 | } |
| 857 | 857 | |
| 858 | 858 | |
src/mess/video/vtech1.c
| r2289 | r2290 | |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | |
| 99 | | static void common_video_start(UINT32 *palette) |
| 99 | static void common_video_start(running_machine *machine, UINT32 *palette) |
| 100 | 100 | { |
| 101 | 101 | m6847_config cfg; |
| 102 | 102 | |
| r2289 | r2290 | |
| 106 | 106 | cfg.get_video_ram = vtech1_get_video_ram; |
| 107 | 107 | cfg.custom_palette = palette; |
| 108 | 108 | cfg.field_sync_callback = vtech1_field_sync_callback; |
| 109 | | m6847_init(&cfg); |
| 109 | m6847_init(machine, &cfg); |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | |
| r2289 | r2290 | |
| 124 | 124 | vtech1_palette_mono[i] = MAKE_RGB(mono, mono, mono); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | | common_video_start(vtech1_palette_mono); |
| 127 | common_video_start(machine, vtech1_palette_mono); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | |
| 131 | 131 | VIDEO_START( vtech1 ) |
| 132 | 132 | { |
| 133 | | common_video_start(NULL); |
| 133 | common_video_start(machine, NULL); |
| 134 | 134 | } |