Previous | 199869 Revisions | Next |
r32688 Sunday 12th October, 2014 at 11:30:13 UTC by Fabio Priuli |
---|
(MESS) gamegear: added preliminary emulation of the Master Gear Adapter which allows to launch SMS games in the gamegear driver, with video chip in SMS mode. You can try this by launching mess.exe gamegear -cart mgear -cart2 your_sms_game (the -cart2 switch becomes available when you mount "mgear" in the main gamegear cart slot) [Fabio Priuli] out of the whatsnew: for the moment only fullpath loading is supported, and it is not ensured to work 100%. thanks to Enik Land for pointing me to the necessary info. |
[hash] | gamegear.xml |
[src/emu/bus] | bus.mak |
[src/emu/bus/sega8] | ccatch.c* ccatch.h* mgear.c* mgear.h* rom.c rom.h sega8_slot.c |
[src/mess/drivers] | sg1000.c sms.c |
r32687 | r32688 | |
---|---|---|
9960 | 9960 | </part> |
9961 | 9961 | </software> |
9962 | 9962 | |
9963 | <software name="mgear"> | |
9964 | <description>Master Gear Adapter</description> | |
9965 | <year>198?</year> | |
9966 | <publisher><unknown></publisher> | |
9967 | <part name="cart" interface="gamegear_cart"> | |
9968 | <feature name="slot" value="mgear" /> | |
9969 | <feature name="pin_42" value="sms_mode" /> | |
9970 | <dataarea name="rom" size="1"> | |
9971 | <!-- this cartridge is just an adapted --> | |
9972 | </dataarea> | |
9973 | </part> | |
9974 | </software> | |
9975 | ||
9963 | 9976 | </softwarelist> |
r32687 | r32688 | |
---|---|---|
822 | 822 | |
823 | 823 | // slot interfaces |
824 | 824 | #include "rom.h" |
825 | #include "ccatch.h" | |
826 | #include "mgear.h" | |
825 | 827 | |
826 | 828 | SLOT_INTERFACE_START(sg1000_cart) |
827 | 829 | SLOT_INTERFACE_INTERNAL("rom", SEGA8_ROM_STD) |
r32687 | r32688 | |
869 | 871 | SLOT_INTERFACE_INTERNAL("rom", SEGA8_ROM_STD) |
870 | 872 | SLOT_INTERFACE_INTERNAL("eeprom", SEGA8_ROM_EEPROM) |
871 | 873 | SLOT_INTERFACE_INTERNAL("codemasters", SEGA8_ROM_CODEMASTERS) |
874 | SLOT_INTERFACE_INTERNAL("mgear", SEGA8_ROM_MGEAR) | |
872 | 875 | SLOT_INTERFACE_END |
873 | 876 |
r0 | r32688 | |
---|---|---|
1 | #ifndef __SEGA8_CCATCH_H | |
2 | #define __SEGA8_CCATCH_H | |
3 | ||
4 | #include "sega8_slot.h" | |
5 | #include "rom.h" | |
6 | ||
7 | // ======================> sega8_cardcatch_device | |
8 | ||
9 | class sega8_cardcatch_device : public sega8_rom_device | |
10 | { | |
11 | public: | |
12 | // construction/destruction | |
13 | sega8_cardcatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); | |
14 | ||
15 | // reading and writing | |
16 | virtual DECLARE_READ8_MEMBER(read_cart); | |
17 | virtual DECLARE_WRITE8_MEMBER(write_cart); | |
18 | virtual DECLARE_WRITE8_MEMBER(write_mapper) {} | |
19 | ||
20 | virtual machine_config_constructor device_mconfig_additions() const; | |
21 | ||
22 | protected: | |
23 | required_device<sega8_card_slot_device> m_card; | |
24 | }; | |
25 | ||
26 | ||
27 | ||
28 | ||
29 | ||
30 | // device type definition | |
31 | extern const device_type SEGA8_ROM_CARDCATCH; | |
32 | ||
33 | #endif |
Added: svn:mime-type + text/plain Added: svn:eol-style + native |
r0 | r32688 | |
---|---|---|
1 | /*********************************************************************************************************** | |
2 | ||
3 | Master Gear Adapter emulation | |
4 | ||
5 | ***********************************************************************************************************/ | |
6 | ||
7 | ||
8 | #include "emu.h" | |
9 | #include "mgear.h" | |
10 | ||
11 | ||
12 | //------------------------------------------------- | |
13 | // constructors | |
14 | //------------------------------------------------- | |
15 | ||
16 | const device_type SEGA8_ROM_MGEAR = &device_creator<sega8_mgear_device>; | |
17 | ||
18 | sega8_mgear_device::sega8_mgear_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) | |
19 | : sega8_rom_device(mconfig, SEGA8_ROM_MGEAR, "Master Gear Adapter", tag, owner, clock, "sega8_mgear", __FILE__), | |
20 | m_subslot(*this, "subslot") | |
21 | { | |
22 | } | |
23 | ||
24 | ||
25 | void sega8_mgear_device::device_start() | |
26 | { | |
27 | } | |
28 | ||
29 | void sega8_mgear_device::device_reset() | |
30 | { | |
31 | } | |
32 | ||
33 | /*------------------------------------------------- | |
34 | mapper specific handlers | |
35 | -------------------------------------------------*/ | |
36 | ||
37 | static MACHINE_CONFIG_FRAGMENT( sub_slot ) | |
38 | MCFG_SMS_CARTRIDGE_ADD("subslot", sms_cart, NULL) | |
39 | MACHINE_CONFIG_END | |
40 | ||
41 | machine_config_constructor sega8_mgear_device::device_mconfig_additions() const | |
42 | { | |
43 | return MACHINE_CONFIG_NAME( sub_slot ); | |
44 | } |
Added: svn:mime-type + text/plain Added: svn:eol-style + native |
r32687 | r32688 | |
---|---|---|
20 | 20 | const device_type SEGA8_ROM_STD = &device_creator<sega8_rom_device>; |
21 | 21 | |
22 | 22 | // Specific SG-1000 MkI - MkII cart types |
23 | const device_type SEGA8_ROM_CARDCATCH = &device_creator<sega8_cardcatch_device>; | |
24 | 23 | const device_type SEGA8_ROM_OTHELLO = &device_creator<sega8_othello_device>; |
25 | 24 | const device_type SEGA8_ROM_CASTLE = &device_creator<sega8_castle_device>; |
26 | 25 | const device_type SEGA8_ROM_BASIC_L3 = &device_creator<sega8_basic_l3_device>; |
r32687 | r32688 | |
56 | 55 | |
57 | 56 | |
58 | 57 | |
59 | sega8_cardcatch_device::sega8_cardcatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) | |
60 | : sega8_rom_device(mconfig, SEGA8_ROM_CARDCATCH, "SG-1000 Card Catcher Cart", tag, owner, clock, "sega8_ccatch", __FILE__), | |
61 | m_card(*this, "cardslot") | |
62 | { | |
63 | } | |
64 | ||
65 | ||
66 | 58 | sega8_othello_device::sega8_othello_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
67 | 59 | : sega8_rom_device(mconfig, SEGA8_ROM_OTHELLO, "SG-1000 Othello Cart", tag, owner, clock, "sega8_othello", __FILE__) |
68 | 60 | { |
r32687 | r32688 | |
374 | 366 | |
375 | 367 | /*------------------------------------------------- |
376 | 368 | |
377 | Sega Card Catcher is a passthrough adapter for | |
378 | SG-1000 to load games in MyCard format into the | |
379 | main cartslot | |
380 | ||
381 | -------------------------------------------------*/ | |
382 | ||
383 | READ8_MEMBER(sega8_cardcatch_device::read_cart) | |
384 | { | |
385 | if (offset < 0x8000) | |
386 | return m_card->read_cart(space, offset); | |
387 | ||
388 | return 0xff; | |
389 | } | |
390 | ||
391 | WRITE8_MEMBER(sega8_cardcatch_device::write_cart) | |
392 | { | |
393 | // this should never happen, because there is no RAM on cards | |
394 | if (offset < 0x8000) | |
395 | logerror("Attempt to write to MyCard\n"); | |
396 | } | |
397 | ||
398 | static SLOT_INTERFACE_START(sg1000_card) | |
399 | SLOT_INTERFACE_INTERNAL("rom", SEGA8_ROM_STD) | |
400 | SLOT_INTERFACE_END | |
401 | ||
402 | static MACHINE_CONFIG_FRAGMENT( sub_slot ) | |
403 | MCFG_SG1000_CARD_ADD("cardslot", sg1000_card, NULL) | |
404 | MACHINE_CONFIG_END | |
405 | ||
406 | machine_config_constructor sega8_cardcatch_device::device_mconfig_additions() const | |
407 | { | |
408 | return MACHINE_CONFIG_NAME( sub_slot ); | |
409 | } | |
410 | ||
411 | /*------------------------------------------------- | |
412 | ||
413 | 369 | Othello is a SG-1000 game featuring 2K of |
414 | 370 | oncart RAM, mapped at 0x8000-0x9fff. |
415 | 371 | Is RAM mirrored? For now we assume so... |
r0 | r32688 | |
---|---|---|
1 | #ifndef __SEGA8_MGEAR_H | |
2 | #define __SEGA8_MGEAR_H | |
3 | ||
4 | #include "sega8_slot.h" | |
5 | #include "rom.h" | |
6 | ||
7 | ||
8 | // ======================> sega8_mgear_device | |
9 | ||
10 | class sega8_mgear_device : public sega8_rom_device | |
11 | { | |
12 | public: | |
13 | // construction/destruction | |
14 | sega8_mgear_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); | |
15 | ||
16 | // device-level overrides | |
17 | virtual void device_start(); | |
18 | virtual void device_reset(); | |
19 | ||
20 | // reading and writing | |
21 | virtual DECLARE_READ8_MEMBER(read_cart) { return m_subslot->read_cart(space, offset); } | |
22 | virtual DECLARE_WRITE8_MEMBER(write_cart) { m_subslot->write_cart(space, offset, data); } | |
23 | virtual DECLARE_WRITE8_MEMBER(write_mapper) { m_subslot->write_mapper(space, offset, data); } | |
24 | ||
25 | virtual machine_config_constructor device_mconfig_additions() const; | |
26 | ||
27 | protected: | |
28 | required_device<sega8_cart_slot_device> m_subslot; | |
29 | }; | |
30 | ||
31 | ||
32 | // device type definition | |
33 | extern const device_type SEGA8_ROM_MGEAR; | |
34 | ||
35 | ||
36 | #endif |
Added: svn:mime-type + text/plain Added: svn:eol-style + native |
r32687 | r32688 | |
---|---|---|
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | // ======================> sega8_cardcatch_device | |
38 | ||
39 | class sega8_cardcatch_device : public sega8_rom_device | |
40 | { | |
41 | public: | |
42 | // construction/destruction | |
43 | sega8_cardcatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); | |
44 | ||
45 | // reading and writing | |
46 | virtual DECLARE_READ8_MEMBER(read_cart); | |
47 | virtual DECLARE_WRITE8_MEMBER(write_cart); | |
48 | virtual DECLARE_WRITE8_MEMBER(write_mapper) {} | |
49 | ||
50 | virtual machine_config_constructor device_mconfig_additions() const; | |
51 | ||
52 | protected: | |
53 | required_device<sega8_card_slot_device> m_card; | |
54 | }; | |
55 | ||
56 | ||
57 | 37 | // ======================> sega8_othello_device |
58 | 38 | |
59 | 39 | class sega8_othello_device : public sega8_rom_device |
r32687 | r32688 | |
363 | 343 | |
364 | 344 | // device type definition |
365 | 345 | extern const device_type SEGA8_ROM_STD; |
366 | extern const device_type SEGA8_ROM_CARDCATCH; | |
367 | 346 | extern const device_type SEGA8_ROM_OTHELLO; |
368 | 347 | extern const device_type SEGA8_ROM_CASTLE; |
369 | 348 | extern const device_type SEGA8_ROM_BASIC_L3; |
r0 | r32688 | |
---|---|---|
1 | /*********************************************************************************************************** | |
2 | ||
3 | SG-1000 Card Catcher emulation | |
4 | ||
5 | Sega Card Catcher is a passthrough adapter for | |
6 | SG-1000 to load games in MyCard format into the | |
7 | main cartslot | |
8 | ||
9 | ***********************************************************************************************************/ | |
10 | ||
11 | ||
12 | #include "emu.h" | |
13 | #include "ccatch.h" | |
14 | ||
15 | ||
16 | //------------------------------------------------- | |
17 | // constructors | |
18 | //------------------------------------------------- | |
19 | ||
20 | const device_type SEGA8_ROM_CARDCATCH = &device_creator<sega8_cardcatch_device>; | |
21 | ||
22 | ||
23 | ||
24 | sega8_cardcatch_device::sega8_cardcatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) | |
25 | : sega8_rom_device(mconfig, SEGA8_ROM_CARDCATCH, "SG-1000 Card Catcher Cart", tag, owner, clock, "sega8_ccatch", __FILE__), | |
26 | m_card(*this, "cardslot") | |
27 | { | |
28 | } | |
29 | ||
30 | ||
31 | /*------------------------------------------------- | |
32 | mapper specific handlers | |
33 | -------------------------------------------------*/ | |
34 | ||
35 | READ8_MEMBER(sega8_cardcatch_device::read_cart) | |
36 | { | |
37 | if (offset < 0x8000) | |
38 | return m_card->read_cart(space, offset); | |
39 | ||
40 | return 0xff; | |
41 | } | |
42 | ||
43 | WRITE8_MEMBER(sega8_cardcatch_device::write_cart) | |
44 | { | |
45 | // this should never happen, because there is no RAM on cards | |
46 | if (offset < 0x8000) | |
47 | logerror("Attempt to write to MyCard\n"); | |
48 | } | |
49 | ||
50 | static SLOT_INTERFACE_START(sg1000_card) | |
51 | SLOT_INTERFACE_INTERNAL("rom", SEGA8_ROM_STD) | |
52 | SLOT_INTERFACE_END | |
53 | ||
54 | static MACHINE_CONFIG_FRAGMENT( sub_slot ) | |
55 | MCFG_SG1000_CARD_ADD("cardslot", sg1000_card, NULL) | |
56 | MACHINE_CONFIG_END | |
57 | ||
58 | machine_config_constructor sega8_cardcatch_device::device_mconfig_additions() const | |
59 | { | |
60 | return MACHINE_CONFIG_NAME( sub_slot ); | |
61 | } |
Added: svn:mime-type + text/plain Added: svn:eol-style + native |
r32687 | r32688 | |
---|---|---|
1143 | 1143 | OBJDIRS += $(BUSOBJ)/sega8 |
1144 | 1144 | BUSOBJS += $(BUSOBJ)/sega8/sega8_slot.o |
1145 | 1145 | BUSOBJS += $(BUSOBJ)/sega8/rom.o |
1146 | BUSOBJS += $(BUSOBJ)/sega8/ccatch.o | |
1147 | BUSOBJS += $(BUSOBJ)/sega8/mgear.o | |
1146 | 1148 | endif |
1147 | 1149 | |
1148 | 1150 | #------------------------------------------------- |
r32687 | r32688 | |
---|---|---|
67 | 67 | |
68 | 68 | #include "includes/sg1000.h" |
69 | 69 | #include "bus/rs232/rs232.h" |
70 | #include "bus/sega8/rom.h" | |
71 | 70 | |
72 | 71 | |
73 | 72 | /*************************************************************************** |
r32687 | r32688 | |
---|---|---|
231 | 231 | #include "sound/2413intf.h" |
232 | 232 | #include "video/315_5124.h" |
233 | 233 | #include "includes/sms.h" |
234 | #include "bus/sega8/rom.h" | |
235 | 234 | |
236 | 235 | #include "sms1.lh" |
237 | 236 |
Previous | 199869 Revisions | Next |