Remove nes implementation so that we can implement it in a better way from scratch.

This commit is contained in:
2026-08-27 00:04:59 +02:00
parent 60a6364625
commit 425ebe0938
47 changed files with 0 additions and 7116 deletions
-71
View File
@@ -1,71 +0,0 @@
const types = @import("types.zig");
const Mirroring = types.Mirroring;
const Nrom = @This();
prg_16k: bool,
mirroring_mode: Mirroring,
pub fn init(
prg_size: usize,
_mirroring: Mirroring,
) Nrom {
return .{
.prg_16k = prg_size == 0x4000,
.mirroring_mode = _mirroring,
};
}
pub fn cpuMapRead(
self: *const Nrom,
address: u16,
) ?usize {
if (address < 0x8000)
return null;
const offset =
@as(usize, address) - 0x8000;
return if (self.prg_16k)
offset & 0x3fff
else
offset;
}
pub fn cpuWrite(
_: *Nrom,
_: u16,
_: u8,
) void {
// NROM has no mapper registers.
}
pub fn ppuMapRead(
_: *const Nrom,
address: u16,
) ?usize {
if (address >= 0x2000)
return null;
return address;
}
pub fn ppuMapWrite(
_: *const Nrom,
address: u16,
) ?usize {
if (address >= 0x2000)
return null;
return address;
}
pub fn mirroring(
self: *const Nrom,
) Mirroring {
return self.mirroring_mode;
}
pub fn irqAsserted(_: *const Nrom) bool {
return false;
}