trunk/src/emu/video/mc6847.c
| r31178 | r31179 | |
| 542 | 542 | //************************************************************************** |
| 543 | 543 | |
| 544 | 544 | //------------------------------------------------- |
| 545 | | // ROM( mc6847 ) |
| 546 | | //------------------------------------------------- |
| 547 | | |
| 548 | | ROM_START( mc6847 ) |
| 549 | | ROM_REGION( 0x200, "chargen", 0 ) |
| 550 | | ROM_LOAD( "mc6847", 0x000, 0x200, CRC(9896fba7) SHA1(d0aa6d15278deda15610d290abc7b2f113ced91f) ) |
| 551 | | ROM_END |
| 552 | | |
| 553 | | |
| 554 | | //------------------------------------------------- |
| 555 | | // rom_region - device-specific ROM region |
| 556 | | //------------------------------------------------- |
| 557 | | |
| 558 | | const rom_entry *mc6847_base_device::device_rom_region() const |
| 559 | | { |
| 560 | | return ROM_NAME( mc6847 ); |
| 561 | | } |
| 562 | | |
| 563 | | |
| 564 | | //------------------------------------------------- |
| 565 | 545 | // ctor |
| 566 | 546 | //------------------------------------------------- |
| 567 | 547 | |
| 568 | 548 | mc6847_base_device::mc6847_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const UINT8 *fontdata, double tpfs, const char *shortname, const char *source) : |
| 569 | 549 | mc6847_friend_device(mconfig, type, name, tag, owner, clock, fontdata, (type == MC6847T1_NTSC) || (type == MC6847T1_PAL), tpfs, 25+191, true, shortname, source), |
| 570 | | m_char_rom(*this, "chargen"), |
| 571 | 550 | m_input_cb(*this), |
| 572 | 551 | m_black_and_white(false), |
| 573 | 552 | m_fixed_mode(0), |
| r31178 | r31179 | |
| 1863 | 1842 | } |
| 1864 | 1843 | |
| 1865 | 1844 | |
| 1866 | | //------------------------------------------------- |
| 1867 | | // ROM( s68047 ) |
| 1868 | | //------------------------------------------------- |
| 1869 | | |
| 1870 | | ROM_START( s68047 ) |
| 1871 | | ROM_REGION( 0x200, "chargen", 0 ) |
| 1872 | | ROM_LOAD( "s68047", 0x000, 0x200, CRC(f6587f95) SHA1(a4578c6c1cc46b9d1cf9a3b43df74cb7b8c24757) ) |
| 1873 | | ROM_END |
| 1874 | | |
| 1875 | | |
| 1876 | | //------------------------------------------------- |
| 1877 | | // rom_region - device-specific ROM region |
| 1878 | | //------------------------------------------------- |
| 1879 | | |
| 1880 | | const rom_entry *s68047_device::device_rom_region() const |
| 1881 | | { |
| 1882 | | return ROM_NAME( s68047 ); |
| 1883 | | } |
| 1884 | | |
| 1885 | 1845 | // |
| 1886 | 1846 | // In the Bandai Super Vision 8000 there is a video setting |
| 1887 | 1847 | // bit which causes black to be displayed as blue when css=1. |
| r31178 | r31179 | |
| 1929 | 1889 | : mc6847_base_device(mconfig, M5C6847P1, "M5C6847P-1", tag, owner, clock, ntsc_square_fontdata8x12, 262.5, "m5c6847p1", __FILE__) |
| 1930 | 1890 | { |
| 1931 | 1891 | } |
| 1932 | | |
| 1933 | | |
| 1934 | | //------------------------------------------------- |
| 1935 | | // ROM( m5c6847p1 ) |
| 1936 | | //------------------------------------------------- |
| 1937 | | |
| 1938 | | ROM_START( m5c6847p1 ) |
| 1939 | | ROM_REGION( 0x200, "chargen", 0 ) |
| 1940 | | ROM_LOAD( "m5c6847p-1", 0x000, 0x200, CRC(540bafe5) SHA1(1b757eb1fa0b695c233b66aa283fb3d780ab9b8b) ) |
| 1941 | | ROM_END |
| 1942 | | |
| 1943 | | |
| 1944 | | //------------------------------------------------- |
| 1945 | | // rom_region - device-specific ROM region |
| 1946 | | //------------------------------------------------- |
| 1947 | | |
| 1948 | | const rom_entry *m5c6847p1_device::device_rom_region() const |
| 1949 | | { |
| 1950 | | return ROM_NAME( m5c6847p1 ); |
| 1951 | | } |
trunk/src/emu/video/mc6847.h
| r31178 | r31179 | |
| 514 | 514 | class mc6847_base_device : public mc6847_friend_device |
| 515 | 515 | { |
| 516 | 516 | public: |
| 517 | | // optional information overrides |
| 518 | | virtual const rom_entry *device_rom_region() const; |
| 519 | | |
| 520 | 517 | template<class _Object> static devcb_base &set_input_callback(device_t &device, _Object object) { return downcast<mc6847_base_device &>(device).m_input_cb.set_callback(object); } |
| 521 | 518 | |
| 522 | 519 | static void set_get_fixed_mode(device_t &device, UINT8 mode) { downcast<mc6847_base_device &>(device).m_fixed_mode = mode; } |
| r31178 | r31179 | |
| 559 | 556 | } |
| 560 | 557 | |
| 561 | 558 | private: |
| 562 | | optional_memory_region m_char_rom; |
| 563 | | |
| 564 | 559 | struct video_scanline |
| 565 | 560 | { |
| 566 | 561 | UINT8 m_sample_count; |
| r31178 | r31179 | |
| 683 | 678 | { |
| 684 | 679 | public: |
| 685 | 680 | s68047_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 686 | | |
| 687 | | // optional information overrides |
| 688 | | virtual const rom_entry *device_rom_region() const; |
| 689 | 681 | |
| 690 | 682 | void hack_black_becomes_blue(bool flag); |
| 691 | 683 | |
| r31178 | r31179 | |
| 697 | 689 | { |
| 698 | 690 | public: |
| 699 | 691 | m5c6847p1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 700 | | |
| 701 | | // optional information overrides |
| 702 | | virtual const rom_entry *device_rom_region() const; |
| 703 | 692 | }; |
| 704 | 693 | |
| 705 | 694 | |