Skip to content

Commit

Permalink
#2 Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hagronnestad committed Apr 6, 2020
1 parent 5f5b8be commit 149b3bc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ComputerSystems/Commodore64/Vic/VicIi.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Drawing;
using Commodore64.Vic.Enums;
using Extensions.Byte;
Expand Down Expand Up @@ -434,8 +434,9 @@ public byte vicRead(ushort address) {

var vicBankOffset = 0;

switch (C64.Memory.Read(0xDD00) & 0b00000011) {
case 0b00000011:
switch (C64.Memory.Read(0xDD00) & 0b11) {

case 0b11:
vicBankOffset = 0;

if (address >= 0x1000 && address <= 0x1FFF) {
Expand All @@ -444,11 +445,11 @@ public byte vicRead(ushort address) {

break;

case 0b00000010:
case 0b10:
vicBankOffset = 0x4000;
break;

case 0b00000001:
case 0b01:
vicBankOffset = 0x8000;

if (address >= 0x1000 && address <= 0x1FFF) {
Expand All @@ -457,7 +458,7 @@ public byte vicRead(ushort address) {

break;

case 0b00000000:
case 0b00:
vicBankOffset = 0xC000;
break;
}
Expand Down

0 comments on commit 149b3bc

Please sign in to comment.