mirror of https://github.com/stella-emu/stella.git
Made formatting for new code in M6532 class match what was already there
(just an OCD thing). Updated changelog for new RIOT changes.
This commit is contained in:
parent
05b10bec6b
commit
59a6f8f9d1
|
@ -19,6 +19,11 @@
|
|||
- YStart autodetection
|
||||
- ...
|
||||
|
||||
* Much improved RIOT timer emulation never before seen in any emulator.
|
||||
Special thanks to DirtyHairy for the implementation, and alex_79 for
|
||||
finding documentation that finally describes in more detail how the
|
||||
M6532 chip actually works.
|
||||
|
||||
* Fixed bug with SaveKey and AtariVox not properly closing their memory
|
||||
files before starting another instance of the same ROM, when the ROM
|
||||
was opened in the ROM launcher.
|
||||
|
|
|
@ -111,23 +111,26 @@ void M6532::updateEmulation()
|
|||
|
||||
mySubTimer = (cycles + mySubTimer) % myDivider;
|
||||
|
||||
if (!myTimerWrapped) {
|
||||
if(!myTimerWrapped)
|
||||
{
|
||||
uInt32 timerTicks = (cycles + subTimer) / myDivider;
|
||||
|
||||
if (timerTicks > myTimer) {
|
||||
if(timerTicks > myTimer)
|
||||
{
|
||||
cycles -= ((myTimer + 1) * myDivider - subTimer);
|
||||
myTimer = 0xFF;
|
||||
myTimerWrapped = true;
|
||||
myInterruptFlag |= TimerBit;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
myTimer -= timerTicks;
|
||||
cycles = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (myTimerWrapped) {
|
||||
if(myTimerWrapped)
|
||||
myTimer = (myTimer - cycles) & 0xFF;
|
||||
}
|
||||
|
||||
myLastCycle = mySystem->cycles();
|
||||
}
|
||||
|
@ -163,9 +166,7 @@ uInt8 M6532::peek(uInt16 addr)
|
|||
// system. However, certain cartridges (notably 4A50) can mirror
|
||||
// the RAM address space, making it necessary to chain accesses.
|
||||
if((addr & 0x1080) == 0x0080 && (addr & 0x0200) == 0x0000)
|
||||
{
|
||||
return myRAM[addr & 0x007f];
|
||||
}
|
||||
|
||||
switch(addr & 0x07)
|
||||
{
|
||||
|
@ -201,9 +202,7 @@ uInt8 M6532::peek(uInt16 addr)
|
|||
{
|
||||
// Timer Flag is always cleared when accessing INTIM
|
||||
myInterruptFlag &= ~TimerBit;
|
||||
|
||||
myTimerWrapped = false;
|
||||
|
||||
return myTimer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue