Previous 15994 Revisions Next

r9849 Thursday 30th December, 2010 at 13:37:27 UTC by Tim Schuerewegen
[GBA] Added support for 14-bit EEPROM addressing. This fixes the lockups in the "Bomberman Max 2" games.
[docs]messnew.txt
[src/mess/drivers]gba.c
[src/mess/includes]gba.h

src/mess/includes/gba.h
r9848r9849
188188   UINT32 flash_size;
189189   UINT32 flash_mask;
190190   intelfsh8_device *mFlashDev;
191   int eeprom_state, eeprom_command, eeprom_count, eeprom_addr, eeprom_bits;
191   int eeprom_state, eeprom_command, eeprom_count, eeprom_addr, eeprom_bits, eeprom_addr_bits;
192192   UINT8 eep_data;
193193
194194   /* nvram-specific for MESS */
src/mess/drivers/gba.c
r9848r9849
20462046   state->windowOn = 0;
20472047   state->fxOn = 0;
20482048
2049   state->bios_protected = 0;
2050
20492051   timer_adjust_oneshot(state->scan_timer, machine->primary_screen->time_until_pos(0, 0), 0);
20502052   timer_adjust_oneshot(state->hbl_timer, attotime_never, 0);
20512053   timer_adjust_oneshot(state->dma_timer[0], attotime_never, 0);
r9848r9849
21892191      case EEP_READ:
21902192         if ((state->eeprom_bits == 0) && (state->eeprom_count))
21912193         {
2194            if (state->eeprom_addr >= sizeof( state->gba_eeprom))
2195            {
2196               fatalerror( "eeprom: invalid address (%x)", state->eeprom_addr);
2197            }
21922198            state->eep_data = state->gba_eeprom[state->eeprom_addr];
21932199             //       printf("EEPROM read @ %x = %x (%x)\n", state->eeprom_addr, state->eep_data, (state->eep_data & 0x80) ? 1 : 0);
21942200            state->eeprom_addr++;
r9848r9849
22452251            state->eeprom_command = EEP_WRITE;
22462252         }
22472253         state->eeprom_state = EEP_ADDR;
2248         state->eeprom_count = 6;
2254         state->eeprom_count = state->eeprom_addr_bits;
22492255         state->eeprom_addr = 0;
22502256         break;
22512257
r9848r9849
22902296         if (state->eeprom_bits == 0)
22912297         {
22922298            mame_printf_verbose("%08x: EEPROM: %02x to %x\n", cpu_get_pc(space->machine->device("maincpu")), state->eep_data, state->eeprom_addr );
2299            if (state->eeprom_addr >= sizeof( state->gba_eeprom))
2300            {
2301               fatalerror( "eeprom: invalid address (%x)", state->eeprom_addr);
2302            }
22932303            state->gba_eeprom[state->eeprom_addr] = state->eep_data;
22942304            state->eeprom_addr++;
22952305            state->eep_data = 0;
r9848r9849
23432353         state->nvptr = (UINT8 *)&state->gba_eeprom;
23442354         state->nvsize = 0x2000;
23452355
2356         // "Bomberman Max 2" series use 14 bit addressing
2357         if ((!memcmp(game_code, "AMHE", 4)) || (!memcmp(game_code, "AMYJ", 4)) || (!memcmp(game_code, "AMYE", 4)) ||
2358            (!memcmp(game_code, "AMHP", 4)) || (!memcmp(game_code, "AMHJ", 4)) || (!memcmp(game_code, "AMYP", 4)))
2359         {
2360            state->eeprom_addr_bits = 14;
2361         }
2362         else
2363         {
2364            state->eeprom_addr_bits = 6;
2365         }
2366
23462367         if (cart_size <= (16 * 1024 * 1024))
23472368         {
23482369            memory_install_read32_handler(cpu_get_address_space(image.device().machine->device("maincpu"), ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_r);
docs/messnew.txt
r9848r9849
9090- [GBA] Fixed protected BIOS reads. This fixes the black screen in
9191  "Banjo Pilot". [Tim Schuerewegen]
9292
93- [GBA] Added support for 14-bit EEPROM addressing. This fixes the lockups
94  in the "Bomberman Max 2" games. [Tim Schuerewegen]
95
9396- [GENESIS] Added support for several genesis PCB carts [El Barto]
9497  Updated softlist to use PCB's
9598  Added J-Cart player 3 and 4 support

Previous 15994 Revisions Next


© 1998-2018 The MESS Team