prgLoad :: Mapper s -> MemoryMap s -> Word16 -> ST s Word8
prgLoad (Mapper0 _) mem addr = 
    case addr of
      x | x >= 0x8000 -> readArray (prg mem) (addr .&. (if prgSize mem > 0x4000 then 0x7FFF else 0x3FFF))
      x | x >= 0x6000 -> readArray (prgRAM mem) (addr .&. 0x1FFF)
      _ -> return 0
prgLoad :: Mapper s -> MemoryMap s -> Word16 -> ST s Word8
prgLoad (Mapper0 _) mem addr = 
    case addr of
      x | x >= 0x8000 -> readArray (prg mem) (addr .&. (if prgSize mem > 0x4000 then 0x7FFF else 0x3FFF))
      x | x >= 0x6000 -> readArray (prgRAM mem) (addr .&. 0x1FFF)
      _ -> return 0
prgLoad (Mapper0 _) mem addr = 
    case addr of
      x | x >= 0x8000 -> readArray (prg mem) (addr .&. (if prgSize mem > 0x4000 then 0x7FFF else 0x3FFF))
      x | x >= 0x6000 -> readArray (prgRAM mem) (addr .&. 0x1FFF)
      _ -> return 0