Previous 15994 Revisions Next

r10182 Monday 24th January, 2011 at 18:35:30 UTC by Tim Schuerewegen
[GBA] Implemented FLASH bank select command. This fixes the NVRAM issue in "Super Mario Advance 4".
[docs]messnew.txt
[src/emu/machine]intelfsh.c intelfsh.h

src/emu/machine/intelfsh.c
r10181r10182
3535   FM_ERASEAMD3,   // part 3 of AMD erase sequence
3636   FM_ERASEAMD4,   // part 4 of AMD erase sequence
3737   FM_BYTEPROGRAM,
38   FM_BANKSELECT,
3839};
3940
4041
r10181r10182
249250     m_erase_sector(0),
250251     m_flash_mode(FM_NORMAL),
251252     m_flash_master_lock(false),
252     m_timer(NULL)
253     m_timer(NULL),
254     m_bank(0)
253255{
254256}
255257
r10181r10182
364366UINT32 intelfsh_device::read_full(UINT32 address)
365367{
366368   UINT32 data = 0;
369   address += m_bank << 16;
367370   switch( m_flash_mode )
368371   {
369372   default:
r10181r10182
458461{
459462//  logerror( "intelflash_write( %d, %08x, %08x )\n", chip, address, data );
460463
464   address += m_bank << 16;
465
461466   switch( m_flash_mode )
462467   {
463468   case FM_NORMAL:
r10181r10182
549554      {
550555         m_flash_mode = FM_NORMAL;
551556      }
557      else if( ( address & 0xffff ) == 0x5555 && ( data & 0xff ) == 0xb0 && m_config.m_type == m_config.FLASH_SANYO_LE26FV10N1TS )
558      {
559         m_flash_mode = FM_BANKSELECT;
560      }
552561      else
553562      {
554563         logerror( "unexpected %08x=%02x in FM_READAMDID2\n", address, data & 0xff );
r10181r10182
694703      }
695704      m_flash_mode = FM_NORMAL;
696705      break;
706   case FM_BANKSELECT:
707      m_bank = data & 0xff;
708      m_flash_mode = FM_NORMAL;
709      break;
697710   }
698711}
src/emu/machine/intelfsh.h
r10181r10182
131131   INT32                  m_flash_mode;
132132   bool                  m_flash_master_lock;
133133   emu_timer *               m_timer;
134   INT32                  m_bank;
134135};
135136
136137
docs/messnew.txt
r10181r10182
4444- [GBA] Allow reading of the BLDALPHA register. This fixes the lockup in
4545  "Donkey Kong Country". [Tim Schuerewegen]
4646
47- [GBA] Implemented FLASH bank select command. This fixes the NVRAM issue in
48  "Super Mario Advance 4". [Tim Schuerewegen]
49
4750- [PDP1] Made the CRT implementation a device.  [Atari Ace]
4851
4952- [PIPPIN] Added pre release rom

Previous 15994 Revisions Next


© 1998-2018 The MESS Team