Previous 199869 Revisions Next

r18425 Wednesday 10th October, 2012 at 18:47:25 UTC by Wilbert Pol
(MESS) gameboy.c: Added support for the mapper used by Sonic 3D Blast 5 pirate.  [Wilbert Pol]
[hash]gameboy.xml
[src/mess/includes]gb.h
[src/mess/machine]gb.c

trunk/hash/gameboy.xml
r18424r18425
2315323153      </part>
2315423154   </software>
2315523155
23156   <software name="sonic3d5" supported="no">
23156   <software name="sonic3d5">
2315723157      <description>Sonic 3D Blast 5 (Chi)</description>
2315823158      <year>1998</year>
2315923159      <publisher>Yong Yong</publisher>
2316023160      <part name="cart" interface="gameboy_cart">
23161         <feature name="mapper" value="unknown" />
23161         <feature name="mapper" value="YongYong" />
2316223162         <dataarea name="rom" size="262144">
2316323163            <rom name="sonic 3d blast 5 (unl).bin" size="262144" crc="5fed0068" sha1="1eb403ee2550106cbb2e3e1d0715b7c9bc07d6be" offset="000000" />
2316423164         </dataarea>
trunk/src/mess/machine/gb.c
r18424r18425
44
55  Machine file to handle emulation of the Nintendo Game Boy.
66
7TODO:
8- YongYong mapper:
9  - During start there are 2 writes to 5000 and 5003, it is still unknown what these do.
10
711  Changes:
812
913    13/2/2002       AK - MBC2 and MBC3 support and added NVRAM support.
r18424r18425
5862   MBC_MBC7,      /*    ?? ROM,    ?? RAM                          */
5963   MBC_WISDOM,      /*    ?? ROM,    ?? RAM - Wisdom tree controller */
6064   MBC_MBC1_KOR,   /*   1MB ROM,    ?? RAM - Korean MBC1 variant    */
65   MBC_YONGYONG,   /*    ?? ROM,    ?? RAM - Appears in Sonic 3D Blast 5 pirate */
6166   MBC_MEGADUCK,   /* MEGADUCK style banking                        */
6267   MBC_UNKNOWN,   /* Unknown mapper                                */
6368};
r18424r18425
231236         space.install_write_handler( 0x4000, 0x5fff, write8_delegate(FUNC(gb_state::gb_ram_bank_select_mbc1_kor),state) );
232237         space.install_write_handler( 0x6000, 0x7fff, write8_delegate(FUNC(gb_state::gb_mem_mode_select_mbc1_kor),state) );
233238         break;
239      case MBC_YONGYONG:
240         space.install_write_handler( 0x2000, 0x2000, write8_delegate(FUNC(gb_state::gb_rom_bank_yongyong_2000),state) );
241         //space.install_write_handler( 0x5000, 0x5003, write8_delegate(FUNC(gb_state::gb_rom_back_yongyong_5000),state) );
242         break;
234243
235244      case MBC_MEGADUCK:
236245         space.install_write_handler( 0x0001, 0x0001, write8_delegate(FUNC(gb_state::megaduck_rom_bank_select_type1),state) );
r18424r18425
773782   gb_set_mbc1_kor_banks(machine());
774783}
775784
785WRITE8_MEMBER(gb_state::gb_rom_bank_yongyong_2000)
786{
787   m_ROMBank = data;
788   gb_rom16_4000( machine(), m_ROMMap[m_ROMBank] );
789}
790
776791WRITE8_MEMBER(gb_state::gb_io_w)
777792{
778793   static const UINT8 timer_shifts[4] = {10, 4, 6, 8};
r18424r18425
16481663            { "MBC7",     MBC_MBC7 },
16491664            { "WISDOM",   MBC_WISDOM },
16501665            { "MBC1_KOR", MBC_MBC1_KOR },
1666            { "YONGYONG", MBC_YONGYONG },
16511667         };
16521668
16531669         for (int i = 0; i < ARRAY_LENGTH(mapper_types) && state->m_MBCType == MBC_UNKNOWN; i++)
r18424r18425
17391755   case 0x20:   state->m_MBCType = MBC_MBC6;   state->m_CartType = SRAM; break;
17401756   case 0x22:   state->m_MBCType = MBC_MBC7;   state->m_CartType = SRAM | BATTERY;      break;
17411757   case 0xBE:   state->m_MBCType = MBC_NONE;   state->m_CartType = 0;            break;   /* used in Flash2Advance GB Bridge boot program */
1758   case 0xEA:   state->m_MBCType = MBC_YONGYONG;   state->m_CartType = 0;   break;   /* Found in Sonic 3D Blast 5 pirate */
17421759   case 0xFD:   state->m_MBCType = MBC_TAMA5;   state->m_CartType = 0 /*RTC | BATTERY?*/;   break;
17431760   case 0xFE:   state->m_MBCType = MBC_HUC3;   state->m_CartType = 0;            break;
17441761   case 0xFF:   state->m_MBCType = MBC_HUC1;   state->m_CartType = 0;            break;
1745   default:   state->m_MBCType = MBC_UNKNOWN;   state->m_CartType = UNKNOWN;         break;
17461762   }
17471763
17481764   /* Check whether we're dealing with a (possible) Wisdom Tree game here */
trunk/src/mess/includes/gb.h
r18424r18425
205205   DECLARE_WRITE8_MEMBER(gb_rom_bank_select_mbc1_kor);
206206   DECLARE_WRITE8_MEMBER(gb_ram_bank_select_mbc1_kor);
207207   DECLARE_WRITE8_MEMBER(gb_mem_mode_select_mbc1_kor);
208   DECLARE_WRITE8_MEMBER(gb_rom_bank_yongyong_2000);
208209   DECLARE_WRITE8_MEMBER(gb_io_w);
209210   DECLARE_WRITE8_MEMBER(gb_io2_w);
210211   DECLARE_WRITE8_MEMBER(sgb_io_w);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team