2002-01-18 16:01:43 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
|
|
|
// SSSS tt ee ee ll ll aa
|
|
|
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
|
|
// SS SS tt ee ll ll aa aa
|
|
|
|
// SSSS ttt eeeee llll llll aaaaa
|
|
|
|
//
|
2022-12-30 17:41:04 +00:00
|
|
|
// Copyright (c) 1995-2023 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
// and the Stella Team
|
2002-01-18 16:01:43 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2002-01-18 16:01:43 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//============================================================================
|
|
|
|
|
2009-11-08 16:46:10 +00:00
|
|
|
#include "CartF0.hxx"
|
2002-01-18 16:01:43 +00:00
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2019-09-16 23:59:08 +00:00
|
|
|
CartridgeF0::CartridgeF0(const ByteBuffer& image, size_t size,
|
2022-12-19 23:03:19 +00:00
|
|
|
string_view md5, const Settings& settings,
|
2020-06-10 19:29:27 +00:00
|
|
|
size_t bsSize)
|
|
|
|
: CartridgeEnhanced(image, size, md5, settings, bsSize)
|
2002-01-18 16:01:43 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2020-04-03 15:08:42 +00:00
|
|
|
bool CartridgeF0::checkSwitchBank(uInt16 address, uInt8)
|
2002-01-18 16:01:43 +00:00
|
|
|
{
|
2020-04-03 15:08:42 +00:00
|
|
|
// Switch banks if necessary
|
2020-04-19 10:19:44 +00:00
|
|
|
if(address == 0x1FF0)
|
2002-05-13 19:17:32 +00:00
|
|
|
{
|
2020-04-03 15:08:42 +00:00
|
|
|
// Switch to next bank
|
2022-03-29 00:30:26 +00:00
|
|
|
const uInt8 nextBank = ((getBank()) + 1) & 0x0F;
|
2020-04-03 15:08:42 +00:00
|
|
|
bank(nextBank);
|
|
|
|
return true;
|
2002-05-13 19:17:32 +00:00
|
|
|
}
|
2020-04-03 15:08:42 +00:00
|
|
|
return false;
|
2002-05-13 19:17:32 +00:00
|
|
|
}
|