Rekai Nyangadzayi Musuka
8e3f48837d
chore: organize io switch statements
2022-03-13 07:50:19 -03:00
Rekai Nyangadzayi Musuka
017ec407f5
chore: don't panic on unknown bus and io writes/reads
...
This will lead to emulation bugs due to devices I've yet to implement but by
doing this a lot of games become playable "by default" such as Doom or
Kirby: Nightmare in Dream Land.
When implementing feature and/or debuggin make sure to set:
panic_on_und_bus and panic_on_und_io to true so that the emu crashes
on unknown reads/writes
2022-03-13 05:39:09 -03:00
Rekai Nyangadzayi Musuka
4a76611fca
feat: implement Timers
2022-03-13 05:35:01 -03:00
Rekai Nyangadzayi Musuka
f1df3d6615
chore: clean up io
2022-03-04 22:55:04 -04:00
Rekai Nyangadzayi Musuka
85f0b13f4a
feat: improve DMA Transfer support
2022-03-03 02:10:29 -04:00
Rekai Nyangadzayi Musuka
cb4d3a9a51
chore: replace unnecessarily complex sign extension implementation
2022-02-28 20:38:50 -04:00
Rekai Nyangadzayi Musuka
ddb68a7952
feat: pass beeg yoshi
2022-02-28 18:24:24 -04:00
Rekai Nyangadzayi Musuka
d6ef53fd67
feat: DMA Transfer MVP
2022-02-28 12:34:00 -06:00
Rekai Nyangadzayi Musuka
ac0486be1b
chore(io): replace some bitfields with enums
2022-02-24 17:20:23 -06:00
Rekai Nyangadzayi Musuka
441ebc38c7
fix: better emulate behaviour of IO reads
2022-02-24 17:20:20 -06:00
Rekai Nyangadzayi Musuka
be2dfb379a
chore: document select unimplmented I/O registers
...
These registers are written to / read from Kirby: Nightmare in Dream Land
2022-02-22 17:14:30 -06:00
Rekai Nyangadzayi Musuka
bc66be6c06
feat: impelement a barebones SRAM
2022-02-22 17:14:26 -06:00
Rekai Nyangadzayi Musuka
c2cf2d2965
feat: implement Hblank and Vcount Interrupts
...
Also implemented unique behaviour when writing to IF
2022-02-21 14:45:47 -06:00
Rekai Nyangadzayi Musuka
c767e88e8d
chore: improve io.zig
2022-02-19 11:48:17 -05:00
Rekai Nyangadzayi Musuka
9e2e8c3d1a
feat: implement mirroring for IWRAM EWRAM, OAM and PALRAM
...
Also realized I confused IWRAM and EWRAM. This is also fixed
TODO: Implemnt Mirroring for VRRAM
2022-02-19 10:08:31 -05:00
Rekai Nyangadzayi Musuka
3746cf6025
chore: don't panic on 32-bit I/O
2022-02-19 06:45:39 -04:00
Rekai Nyangadzayi Musuka
f6c8d7ca07
chore: stub CPU HALTing
2022-02-17 00:27:34 -04:00
Rekai Nyangadzayi Musuka
4018f3875b
chore: properly write to VOFS and HOFS in 32-bit bus
2022-02-16 23:23:41 -04:00
Rekai Nyangadzayi Musuka
034f2e8d1d
feat: implement hofs and vofs on io bus
2022-02-16 04:29:04 -04:00
Rekai Nyangadzayi Musuka
ce97a52868
feat: add support for multiple BGs in Mode 0
2022-02-16 03:27:06 -04:00
Rekai Nyangadzayi Musuka
d2d4667f7b
feat: document mode 0
2022-02-16 03:05:19 -04:00
Rekai Nyangadzayi Musuka
e5a76a3c02
chore: give DISPCNT DISPSTAT and VCOUNT to PPU struct
2022-02-13 04:28:15 -04:00
Rekai Nyangadzayi Musuka
31fa06ac4a
chore: give io read/write functions access to the entire Bus
2022-02-13 04:13:06 -04:00
Rekai Nyangadzayi Musuka
ec25a9aae4
feat: implement BG Scrolling Registers
2022-02-13 04:04:10 -04:00
Rekai Nyangadzayi Musuka
b238a3e8f3
feat: impelemnt BG0,1,2CNT and IF
2022-02-13 03:23:09 -04:00
Rekai Nyangadzayi Musuka
0aece06107
chore: dont use std.mem.bytesToValue
...
the stdlib accounts for endianness, which isn't something we want.
2022-02-05 21:05:08 -04:00
Rekai Nyangadzayi Musuka
2842345111
chore: remove unnecessary @as calls
2022-02-05 21:01:39 -04:00
Rekai Nyangadzayi Musuka
78080b4682
fix: zero initialize all allocated memory
2022-02-05 15:54:53 -04:00
Rekai Nyangadzayi Musuka
428eff1468
Revert "fix: allow for 32-bit reads to KEYINPUT"
...
This reverts commit 3a51707280
.
2022-02-05 14:52:49 -04:00
Rekai Nyangadzayi Musuka
3a51707280
fix: allow for 32-bit reads to KEYINPUT
2022-02-05 13:47:05 -04:00
Rekai Nyangadzayi Musuka
2f74b61f2e
feat: parse cartridge header
2022-02-04 05:54:06 -04:00
Rekai Nyangadzayi Musuka
3e4f9eddb2
feat: integrate zig-clap with ZBA
2022-02-04 03:12:35 -04:00
Rekai Nyangadzayi Musuka
33399e9517
chore: update to latest zig nightly
2022-02-02 21:26:12 -04:00
Rekai Nyangadzayi Musuka
28c81f79ae
fix: no buttons are pressed by default
2022-02-01 20:52:01 -04:00
Rekai Nyangadzayi Musuka
b0332e6eb8
chore: stub KeyInput I/O register
2022-01-30 02:38:29 -04:00
Rekai Nyangadzayi Musuka
6c008ce950
fix: allow 32-bit writes to DISPCNT
2022-01-30 01:42:54 -04:00
Rekai Nyangadzayi Musuka
1456d0f317
chore(bios): allow reading from BIOS
2022-01-25 10:32:28 -04:00
Rekai Nyangadzayi Musuka
1c173eb4b8
chore(io): implement IE and IME
2022-01-12 02:19:26 -04:00
Rekai Nyangadzayi Musuka
0f08ad05be
feat(bus): implement IWRAM and EWRAM
2022-01-10 07:59:21 -04:00
Rekai Nyangadzayi Musuka
89a8fe403b
feat(bus): have VCOUNT be addressable on the bus
2022-01-10 03:35:28 -04:00
Rekai Nyangadzayi Musuka
2467b94dbd
chore(io): rename some io bitfield fields
2022-01-10 02:13:25 -04:00
Rekai Nyangadzayi Musuka
0d4c850218
chore: remove premature inlines
2022-01-10 01:24:14 -04:00
Rekai Nyangadzayi Musuka
568c374131
chore: code cleanup
2022-01-07 20:00:42 -04:00
Rekai Nyangadzayi Musuka
a407671de2
chore(io): alias @This() to Self in io.zig
2022-01-07 19:34:54 -04:00
Rekai Nyangadzayi Musuka
e9ec124e33
chore: refactor bios.zig and pak.zig
2022-01-07 19:33:49 -04:00
Rekai Nyangadzayi Musuka
9f64804763
fix: by convention deinit() should not take pointers to self
2022-01-07 19:16:23 -04:00
Rekai Nyangadzayi Musuka
c6123d8a6d
feat: implement PPU Timings in Scheduler
2022-01-05 21:18:33 -04:00
Rekai Nyangadzayi Musuka
5ea888f68c
feat(bus): implement Palette RAM and DISPSTAT
2022-01-04 03:29:56 -06:00
Rekai Nyangadzayi Musuka
8b9a80b279
fix(bus): restrict Game ROM and VRAM to a 16-bit bus
2022-01-04 03:08:12 -06:00
Rekai Nyangadzayi Musuka
3aa680ab8c
chore: remove all memory leaks
2022-01-03 20:08:55 -06:00
Rekai Nyangadzayi Musuka
c9f0e1632c
fix(io): fix DISPCNT is at wrong IO address
2022-01-03 17:49:15 -06:00
Rekai Nyangadzayi Musuka
dee0e113d8
feat(cpu): implement skipBios method
2022-01-02 14:58:39 -06:00
Rekai Nyangadzayi Musuka
eb37d73cb2
chore: panic on read from BIOS
...
GBA Bios requires a lot of implemented features, so we're ignoring it
for now
2022-01-02 14:57:59 -06:00
Rekai Nyangadzayi Musuka
1c42d1795a
feat(bus): add Io Struct
...
Also, add more information to all panic messages
2022-01-02 14:40:49 -06:00
Rekai Nyangadzayi Musuka
01d6399dfb
chore: rename consturctors to fit convention
2022-01-02 13:58:57 -06:00
Rekai Nyangadzayi Musuka
e144261e07
feat(bus): emu is now able to read from user-provided BIOS
2022-01-02 03:16:03 -06:00