Previous 199869 Revisions Next

r41646 Sunday 8th November, 2015 at 11:32:30 UTC by Miodrag Milanović
Merge pull request #459 from fulivi/imds2_dev2

Serial ports added to imds2
[src/mame/drivers]ddenlovr.c equites.c microkit.c
[src/mame/includes]equites.h
[src/mame/video]equites.c

trunk/src/mame/drivers/ddenlovr.c
r250157r250158
697697   if (baddr / 8 >= src_len)
698698   {
699699#ifdef MAME_DEBUG
700      popmessage("GFX ROM OVER %06x", baddr / 8);
700//      popmessage("GFX ROM OVER %06x", baddr / 8);
701701#endif
702702      return 1;
703703   }
trunk/src/mame/drivers/equites.c
r250157r250158
524524
525525
526526/******************************************************************************/
527// Local Functions
528
529/******************************************************************************/
530527// Interrupt Handlers
531528
532// Equites Hardware
533529TIMER_DEVICE_CALLBACK_MEMBER(equites_state::equites_scanline)
534530{
535531   int scanline = param;
r250157r250158
596592
597593
598594/******************************************************************************/
599// Main CPU Handlers
595// CPU Handlers
600596
601CUSTOM_INPUT_MEMBER(equites_state::gekisou_unknown_status)
597CUSTOM_INPUT_MEMBER(equites_state::gekisou_unknown_bit_r)
602598{
603   return m_unknown_bit;
599   return m_gekisou_unknown_bit;
604600}
605601
606WRITE16_MEMBER(equites_state::gekisou_unknown_0_w)
602WRITE16_MEMBER(equites_state::gekisou_unknown_bit_w)
607603{
608   m_unknown_bit = 0;
604   // data bit is A16 (offset)
605   m_gekisou_unknown_bit = (offset == 0) ? 0 : 1;;
609606}
610607
611WRITE16_MEMBER(equites_state::gekisou_unknown_1_w)
612{
613   m_unknown_bit = 1;
614}
615608
616
617
618/******************************************************************************/
619// Main CPU Memory Map
620
621609READ16_MEMBER(equites_state::equites_spriteram_kludge_r)
622610{
623611   if (m_spriteram[0] == 0x5555)
r250157r250158
659647}
660648
661649
650
651/******************************************************************************/
652// CPU Memory Maps
653
662654static ADDRESS_MAP_START( equites_map, AS_PROGRAM, 16, equites_state )
663655   ADDRESS_MAP_UNMAP_HIGH
664656   AM_RANGE(0x000000, 0x00ffff) AM_ROM // ROM area is written several times (dev system?)
665   AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram")   // nvram is for gekisou only
657   AM_RANGE(0x040000, 0x040fff) AM_RAM
666658   AM_RANGE(0x080000, 0x080fff) AM_READWRITE8(equites_fg_videoram_r, equites_fg_videoram_w, 0x00ff)
667659   AM_RANGE(0x0c0000, 0x0c01ff) AM_RAM_WRITE(equites_bg_videoram_w) AM_SHARE("bg_videoram")
668660   AM_RANGE(0x0c0200, 0x0c0fff) AM_RAM
r250157r250158
675667   AM_RANGE(0x18c000, 0x18c001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_switch_w)
676668   AM_RANGE(0x1c0000, 0x1c0001) AM_READ_PORT("IN0") AM_WRITE(equites_scrollreg_w)
677669   AM_RANGE(0x380000, 0x380001) AM_WRITE8(equites_bgcolor_w, 0xff00)
678   // 580000 unknown (protection?) (gekisou only, installed by DRIVER_INIT)
679   // 5a0000 unknown (protection?) (gekisou only, installed by DRIVER_INIT)
680670   AM_RANGE(0x780000, 0x780001) AM_WRITE(watchdog_reset16_w)
681671ADDRESS_MAP_END
682672
673static ADDRESS_MAP_START( gekisou_map, AS_PROGRAM, 16, equites_state )
674   AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram") // mainram is battery-backed
675   AM_RANGE(0x580000, 0x580001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(gekisou_unknown_bit_w)
676   AM_IMPORT_FROM( equites_map )
677ADDRESS_MAP_END
678
679
683680static ADDRESS_MAP_START( splndrbt_map, AS_PROGRAM, 16, equites_state )
684681   ADDRESS_MAP_UNMAP_HIGH
685682   AM_RANGE(0x000000, 0x00ffff) AM_ROM
686   AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("workram")
683   AM_RANGE(0x040000, 0x040fff) AM_RAM
687684   AM_RANGE(0x080000, 0x080001) AM_READ_PORT("IN0")
688685   AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("IN1")
689686   AM_RANGE(0x0c0000, 0x0c0001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE8(equites_bgcolor_w, 0xff00) // note: addressmask does not apply here
r250157r250158
702699   AM_RANGE(0x600100, 0x6001ff) AM_RAM AM_SHARE("spriteram_2") // sprite RAM 2 (8-bit)
703700ADDRESS_MAP_END
704701
702
705703static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, equites_state )
706704   AM_RANGE(0x0000, 0xbfff) AM_ROM
707705   AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r)
r250157r250158
780778
781779   /* this is actually a variable resistor */
782780   PORT_START(FRQ_ADJUSTER_TAG)
783   PORT_ADJUSTER(25, "MSM5232 Clock")
781   PORT_ADJUSTER(25, "MSM5232 Clock") // approximate factory setting
784782INPUT_PORTS_END
785783
786784/******************************************************************************/
r250157r250158
799797   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
800798   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
801799   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
802   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state,gekisou_unknown_status, NULL)
800   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state, gekisou_unknown_bit_r, NULL)
803801
804802   /* this is actually a variable resistor */
805803   PORT_START(FRQ_ADJUSTER_TAG)
806   PORT_ADJUSTER(24, "MSM5232 Clock")
804   PORT_ADJUSTER(24, "MSM5232 Clock") // approximate factory setting
807805INPUT_PORTS_END
808806
809807/******************************************************************************/
r250157r250158
836834
837835   /* this is actually a variable resistor */
838836   PORT_START(FRQ_ADJUSTER_TAG)
839   PORT_ADJUSTER(33, "MSM5232 Clock")
837   PORT_ADJUSTER(33, "MSM5232 Clock") // approximate factory setting
840838INPUT_PORTS_END
841839
842840/******************************************************************************/
r250157r250158
869867
870868   /* this is actually a variable resistor */
871869   PORT_START(FRQ_ADJUSTER_TAG)
872   PORT_ADJUSTER(33, "MSM5232 Clock")
870   PORT_ADJUSTER(33, "MSM5232 Clock") // approximate factory setting
873871INPUT_PORTS_END
874872
875873/******************************************************************************/
r250157r250158
902900
903901   /* this is actually a variable resistor */
904902   PORT_START(FRQ_ADJUSTER_TAG)
905   PORT_ADJUSTER(28, "MSM5232 Clock")
903   PORT_ADJUSTER(28, "MSM5232 Clock") // approximate factory setting
906904INPUT_PORTS_END
907905
908906/******************************************************************************/
r250157r250158
951949
952950   /* this is actually a variable resistor */
953951   PORT_START(FRQ_ADJUSTER_TAG)
954   PORT_ADJUSTER(27, "MSM5232 Clock")
952   PORT_ADJUSTER(27, "MSM5232 Clock") // approximate factory setting
955953INPUT_PORTS_END
956954
957955
r250157r250158
10881086
10891087/******************************************************************************/
10901088
1091MACHINE_START_MEMBER(equites_state,equites)
1089void equites_state::machine_start()
10921090{
1091   // zerofill
1092   m_fg_char_bank = 0;
1093   m_bgcolor = 0;
1094   m_splndrbt_bg_scrollx = 0;
1095   m_splndrbt_bg_scrolly = 0;
1096   m_sound_prom_address = 0;
1097   m_dac_latch = 0;
1098   m_eq8155_port_b = 0;
1099   m_eq8155_port_a = 0;
1100   m_eq8155_port_c = 0;
1101   m_ay_port_a = 0;
1102   m_ay_port_b = 0;
1103   m_eq_cymbal_ctrl = 0;
1104   m_cymvol = 0.0;
1105   m_hihatvol = 0.0;
1106   m_timer_count = 0;
1107   m_gekisou_unknown_bit = 0;
1108
1109   // register for savestates
10931110   save_item(NAME(m_fg_char_bank));
10941111   save_item(NAME(m_bgcolor));
10951112   save_item(NAME(m_splndrbt_bg_scrollx));
r250157r250158
11051122   save_item(NAME(m_cymvol));
11061123   save_item(NAME(m_hihatvol));
11071124   save_item(NAME(m_timer_count));
1108   save_item(NAME(m_unknown_bit));
1125   save_item(NAME(m_gekisou_unknown_bit));
11091126
11101127   m_nmi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(equites_state::equites_nmi_callback), this));
11111128
r250157r250158
11131130   m_adjuster_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60));
11141131}
11151132
1116MACHINE_RESET_MEMBER(equites_state,equites)
1133void equites_state::machine_reset()
11171134{
11181135   flip_screen_set(0);
1119
1120   m_fg_char_bank = 0;
1121   m_bgcolor = 0;
1122   m_splndrbt_bg_scrollx = 0;
1123   m_splndrbt_bg_scrolly = 0;
1124   m_sound_prom_address = 0;
1125   m_dac_latch = 0;
1126   m_eq8155_port_b = 0;
1127   m_eq8155_port_a = 0;
1128   m_eq8155_port_c = 0;
1129   m_ay_port_a = 0;
1130   m_ay_port_b = 0;
1131   m_eq_cymbal_ctrl = 0;
1132   m_cymvol = 0.0;
1133   m_hihatvol = 0.0;
1134   m_timer_count = 0;
1135   m_unknown_bit = 0;
11361136}
11371137
11381138
r250157r250158
11621162   MCFG_PALETTE_INIT_OWNER(equites_state,equites)
11631163
11641164   MCFG_VIDEO_START_OVERRIDE(equites_state,equites)
1165
1166   MCFG_MACHINE_START_OVERRIDE(equites_state,equites)
1167   MCFG_MACHINE_RESET_OVERRIDE(equites_state,equites)
11681165MACHINE_CONFIG_END
11691166
11701167static MACHINE_CONFIG_DERIVED( gekisou, equites )
11711168
1169   /* basic machine hardware */
1170   MCFG_CPU_MODIFY("maincpu")
1171   MCFG_CPU_PROGRAM_MAP(gekisou_map)
1172
11721173   // mcu not dumped, so add simulated mcu
11731174   MCFG_CPU_ADD("mcu", ALPHA8301L, 4000000/8)
11741175   MCFG_CPU_PROGRAM_MAP(mcu_map)
r250157r250158
12041205   MCFG_PALETTE_INIT_OWNER(equites_state,splndrbt)
12051206
12061207   MCFG_VIDEO_START_OVERRIDE(equites_state,splndrbt)
1207
1208   MCFG_MACHINE_START_OVERRIDE(equites_state,equites)
1209   MCFG_MACHINE_RESET_OVERRIDE(equites_state,equites)
12101208MACHINE_CONFIG_END
12111209
12121210static MACHINE_CONFIG_DERIVED( hvoltage, splndrbt )
r250157r250158
17701768/******************************************************************************/
17711769// Initializations
17721770
1773void equites_state::unpack_block( const char *region, int offset, int size )
1771void equites_state::unpack_block(const char *region, int offset, int size)
17741772{
17751773   UINT8 *rom = memregion(region)->base();
1776   int i;
17771774
1778   for (i = 0; i < size; ++i)
1775   for (int i = 0; i < size; i++)
17791776   {
17801777      rom[(offset + i + size)] = (rom[(offset + i)] >> 4);
17811778      rom[(offset + i)] &= 0x0f;
17821779   }
17831780}
17841781
1785void equites_state::unpack_region( const char *region )
1782void equites_state::unpack_region(const char *region)
17861783{
17871784   unpack_block(region, 0x0000, 0x2000);
17881785   unpack_block(region, 0x4000, 0x2000);
r250157r250158
17951792   unpack_region("gfx3");
17961793}
17971794
1798DRIVER_INIT_MEMBER(equites_state,bullfgtr)
1799{
1800   unpack_region("gfx2");
1801   unpack_region("gfx3");
1802}
1803
1804DRIVER_INIT_MEMBER(equites_state,kouyakyu)
1805{
1806   unpack_region("gfx2");
1807   unpack_region("gfx3");
1808}
1809
1810DRIVER_INIT_MEMBER(equites_state,gekisou)
1811{
1812   unpack_region("gfx2");
1813   unpack_region("gfx3");
1814
1815   // install special handlers for unknown device (protection?)
1816   m_maincpu->space(AS_PROGRAM).install_write_handler(0x580000, 0x580001, write16_delegate(FUNC(equites_state::gekisou_unknown_0_w),this));
1817   m_maincpu->space(AS_PROGRAM).install_write_handler(0x5a0000, 0x5a0001, write16_delegate(FUNC(equites_state::gekisou_unknown_1_w),this));
1818}
1819
18201795DRIVER_INIT_MEMBER(equites_state,splndrbt)
18211796{
18221797   unpack_region("gfx3");
r250157r250158
18291804// Game Entries
18301805
18311806// Equites Hardware
1832GAME( 1984, equites,  0,        equites,  equites,  equites_state, equites,  ROT90, "Alpha Denshi Co.", "Equites", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1833GAME( 1984, equitess, equites,  equites,  equites,  equites_state, equites,  ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1834GAME( 1984, bullfgtr, 0,        equites,  bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1835GAME( 1984, bullfgtrs,bullfgtr, equites,  bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1836GAME( 1985, kouyakyu, 0,        equites,  kouyakyu, equites_state, kouyakyu, ROT0,  "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1837GAME( 1985, gekisou,  0,        gekisou,  gekisou,  equites_state, gekisou,  ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1807GAME( 1984, equites,   0,        equites,  equites,  equites_state, equites,  ROT90, "Alpha Denshi Co.", "Equites", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1808GAME( 1984, equitess,  equites,  equites,  equites,  equites_state, equites,  ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1809GAME( 1984, bullfgtr,  0,        equites,  bullfgtr, equites_state, equites,  ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1810GAME( 1984, bullfgtrs, bullfgtr, equites,  bullfgtr, equites_state, equites,  ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1811GAME( 1985, kouyakyu,  0,        equites,  kouyakyu, equites_state, equites,  ROT0,  "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1812GAME( 1985, gekisou,   0,        gekisou,  gekisou,  equites_state, equites,  ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
18381813
18391814// Splendor Blast Hardware
1840GAME( 1985, splndrbt, 0,        splndrbt, splndrbt, equites_state, splndrbt, ROT0,  "Alpha Denshi Co.", "Splendor Blast", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1841GAME( 1985, hvoltage, 0,        hvoltage, hvoltage, equites_state, splndrbt, ROT0,  "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1815GAME( 1985, splndrbt,  0,        splndrbt, splndrbt, equites_state, splndrbt, ROT0,  "Alpha Denshi Co.", "Splendor Blast", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1816GAME( 1985, hvoltage,  0,        hvoltage, hvoltage, equites_state, splndrbt, ROT0,  "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/microkit.c
r250157r250158
66
77    http://www.vintagecomputer.net/browse_thread.cfm?id=511
88
9*/
9    Press CR or LF to get the * prompt.
10    Commands:
11    $Pxxxx - Jump to address xxxx
12    ?Mxxxx yyyy - Dump memory starting at xxxx for yyyy bytes
13    !Mxxxx yy zz... - Write data (yy etc) to memory xxxx. Data gets entered when you
14                      press the space after the data.
1015
16    There's no sound or storage facilities, therefore no software.
17
18    ToDo:
19    - No technical manual or schematic available, so the entire driver is bodgy guesswork.
20    - Address 0 needs to be read/writeable, otherwise the numbers you enter will get
21            internally corrupted.
22    - Address 8000 is IDL which hangs the system, so program counter is preset to 8001.
23    - The keyboard is hooked up serially, which is ok, but the output to the terminal
24            is rubbish, so parallel is used so you can at least see something.
25    - When you enter commands, you can't see what you're doing.
26    - When you enter numbers, they display as rubbish or act as control codes. They
27            internally work though.
28    - The computer looks like a rack-mount metal box with a rudimentary front panel.
29            Buttons are: Reset; Load; Run program; Run Utility
30            There is a RUN LED.
31            None of these items are emulated.
32            It also has a power switch and lamp, and a fuse.
33
34*****************************************************************************************/
35
1136#include "emu.h"
1237#include "cpu/cosmac/cosmac.h"
38#include "bus/rs232/rs232.h"
39#include "machine/terminal.h"
1340
41
1442class microkit_state : public driver_device
1543{
1644public:
1745   microkit_state(const machine_config &mconfig, device_type type, const char *tag)
1846      : driver_device(mconfig, type, tag)
47      , m_maincpu(*this, "maincpu")
48      , m_rs232(*this, "rs232")
49      , m_terminal(*this, "terminal")
1950   { }
51
52   DECLARE_READ_LINE_MEMBER(clear_r);
53   DECLARE_WRITE8_MEMBER(ram_w);
54   DECLARE_READ8_MEMBER(ram_r);
55
56private:
57   virtual void machine_reset();
58   UINT8 m_resetcnt;
59   UINT8 m_ram_data;
60   required_device<cosmac_device> m_maincpu;
61   required_device<rs232_port_device> m_rs232;
62   required_device<generic_terminal_device> m_terminal;
2063};
2164
2265static ADDRESS_MAP_START( microkit_mem, AS_PROGRAM, 8, microkit_state )
23   AM_RANGE(0x0000, 0x01ff) AM_ROM AM_REGION("maincpu", 0)
66   AM_RANGE(0x0000, 0x0000) AM_READWRITE(ram_r,ram_w)
67   AM_RANGE(0x8000, 0x81ff) AM_ROM AM_REGION("maincpu", 0)
68   AM_RANGE(0x8200, 0x83ff) AM_RAM
2469ADDRESS_MAP_END
2570
2671static ADDRESS_MAP_START( microkit_io, AS_IO, 8, microkit_state )
72   AM_RANGE(0x07, 0x07) AM_WRITENOP // writes a lots of zeros here
2773ADDRESS_MAP_END
2874
2975static INPUT_PORTS_START( microkit )
3076INPUT_PORTS_END
3177
78READ_LINE_MEMBER( microkit_state::clear_r )
79{
80   if (m_resetcnt < 0x10)
81      m_maincpu->set_state_int(COSMAC_R0, 0x8001); // skip IDL
82   if (m_resetcnt < 0x20)
83      m_resetcnt++;
84   // set reset pin to normal
85   return 1;
86}
87
88READ8_MEMBER( microkit_state::ram_r )
89{
90   return m_ram_data;
91}
92
93WRITE8_MEMBER( microkit_state::ram_w )
94{
95   m_ram_data = data;
96   if (data > 0 && data < 0x80)
97      m_terminal->write(space, 0, data);
98}
99
100void microkit_state::machine_reset()
101{
102   m_resetcnt = 0;
103   m_ram_data = 0;
104}
105
106static DEVICE_INPUT_DEFAULTS_START( serial_keyb )
107   DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_300 )
108   DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_300 )
109   DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )
110   DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 )
111   DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE )
112   DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
113DEVICE_INPUT_DEFAULTS_END
114
115
32116static MACHINE_CONFIG_START( microkit, microkit_state )
33117   // basic machine hardware
34   MCFG_CPU_ADD("maincpu", CDP1801, 2000000)
118   MCFG_CPU_ADD("maincpu", CDP1802, 1750000)
35119   MCFG_CPU_PROGRAM_MAP(microkit_mem)
36120   MCFG_CPU_IO_MAP(microkit_io)
37121   MCFG_COSMAC_WAIT_CALLBACK(VCC)
122   MCFG_COSMAC_CLEAR_CALLBACK(READLINE(microkit_state, clear_r))
123
124   /* video hardware */
125   MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "keyboard")
126   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("maincpu", cosmac_device, ef4_w))
127   MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("keyboard", serial_keyb)
128   MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
38129MACHINE_CONFIG_END
39130
40131ROM_START( microkit )
trunk/src/mame/includes/equites.h
r250157r250158
2020      m_bg_videoram(*this, "bg_videoram"),
2121      m_spriteram(*this, "spriteram"),
2222      m_spriteram_2(*this, "spriteram_2"),
23      m_workram(*this, "workram"),
2423      m_mcuram(*this, "mcuram"),
2524      m_maincpu(*this, "maincpu"),
2625      m_audiocpu(*this, "audiocpu"),
r250157r250158
4039   UINT8 *m_fg_videoram;    // 8bits
4140   required_shared_ptr<UINT16> m_spriteram;
4241   optional_shared_ptr<UINT16> m_spriteram_2;
43   optional_shared_ptr<UINT16> m_workram;
4442   optional_shared_ptr<UINT8> m_mcuram;
4543
4644   /* video-related */
r250157r250158
6563   float     m_cymvol;
6664   float     m_hihatvol;
6765   int       m_timer_count;
68   int       m_unknown_bit;    // Gekisou special handling
66   int       m_gekisou_unknown_bit;
6967
7068   /* devices */
7169   required_device<cpu_device> m_maincpu;
r250157r250158
8583   DECLARE_WRITE8_MEMBER(equites_dac_latch_w);
8684   DECLARE_WRITE8_MEMBER(equites_8155_portb_w);
8785   DECLARE_WRITE8_MEMBER(equites_8155_w);
88   DECLARE_WRITE16_MEMBER(gekisou_unknown_0_w);
89   DECLARE_WRITE16_MEMBER(gekisou_unknown_1_w);
86   DECLARE_WRITE16_MEMBER(gekisou_unknown_bit_w);
9087   DECLARE_READ16_MEMBER(equites_spriteram_kludge_r);
9188   DECLARE_READ8_MEMBER(mcu_ram_r);
9289   DECLARE_WRITE8_MEMBER(mcu_ram_w);
r250157r250158
10299   DECLARE_WRITE8_MEMBER(equites_flipb_w);
103100   DECLARE_WRITE16_MEMBER(splndrbt_bg_scrollx_w);
104101   DECLARE_WRITE16_MEMBER(splndrbt_bg_scrolly_w);
105   DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_status);
102   DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_bit_r);
106103   DECLARE_WRITE8_MEMBER(equites_8910porta_w);
107104   DECLARE_WRITE8_MEMBER(equites_8910portb_w);
108   DECLARE_DRIVER_INIT(bullfgtr);
109   DECLARE_DRIVER_INIT(kouyakyu);
110   DECLARE_DRIVER_INIT(gekisou);
111105   DECLARE_DRIVER_INIT(splndrbt);
112106   DECLARE_DRIVER_INIT(equites);
113107   TILE_GET_INFO_MEMBER(equites_fg_info);
114108   TILE_GET_INFO_MEMBER(splndrbt_fg_info);
115109   TILE_GET_INFO_MEMBER(equites_bg_info);
116110   TILE_GET_INFO_MEMBER(splndrbt_bg_info);
117   DECLARE_MACHINE_START(equites);
118   DECLARE_MACHINE_RESET(equites);
119111   DECLARE_VIDEO_START(equites);
120112   DECLARE_PALETTE_INIT(equites);
121113   DECLARE_VIDEO_START(splndrbt);
r250157r250158
127119   TIMER_DEVICE_CALLBACK_MEMBER(equites_scanline);
128120   TIMER_DEVICE_CALLBACK_MEMBER(splndrbt_scanline);
129121   DECLARE_WRITE_LINE_MEMBER(equites_msm5232_gate);
130   void equites_draw_sprites_block( bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end );
122   void equites_draw_sprites_block(bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end);
131123   void equites_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
132   void splndrbt_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
133   void splndrbt_copy_bg( bitmap_ind16 &dst_bitmap, const rectangle &cliprect );
134   void equites_update_dac(  );
135   void unpack_block( const char *region, int offset, int size );
136   void unpack_region( const char *region );
124   void splndrbt_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
125   void splndrbt_copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect);
126   void equites_update_dac();
127   void unpack_block(const char *region, int offset, int size);
128   void unpack_region(const char *region);
129
130   virtual void machine_start();
131   virtual void machine_reset();
137132};
trunk/src/mame/video/equites.c
r250157r250158
230230 *
231231 *************************************/
232232
233void equites_state::equites_draw_sprites_block( bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end )
233void equites_state::equites_draw_sprites_block(bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end)
234234{
235235   for (int offs = end - 2; offs >= start; offs -= 2)
236236   {
r250157r250158
30130103020303 03030303 03030303 03030303
302302*/
303303
304void equites_state::splndrbt_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
304void equites_state::splndrbt_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
305305{
306306   const UINT8 * const xrom = memregion("user2")->base();
307307   const UINT8 * const yrom = xrom + 0x100;
r250157r250158
360360                  if (bx >= cliprect.min_x && bx <= cliprect.max_x)
361361                  {
362362                     int xx = scalex ? (x * 29 + scalex) / (scalex << 1) + 1 : 16;   // FIXME This is wrong. Should use the PROM.
363                     int const offset = (fx ? (31 - xx) : xx) + ((fy ^ yhalf) ? (16 + line) : (15 - line) ) * gfx->rowbytes();
363                     int const offset = (fx ? (31 - xx) : xx) + ((fy ^ yhalf) ? (16 + line) : (15 - line)) * gfx->rowbytes();
364364
365365                     int pen = srcgfx[offset];
366366
r250157r250158
375375}
376376
377377
378void equites_state::splndrbt_copy_bg( bitmap_ind16 &dst_bitmap, const rectangle &cliprect )
378void equites_state::splndrbt_copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect)
379379{
380380   bitmap_ind16 &src_bitmap = m_bg_tilemap->pixmap();
381381   bitmap_ind8 &flags_bitmap = m_bg_tilemap->flagsmap();


Previous 199869 Revisions Next


© 1997-2024 The MAME Team