Commit graph

86 commits

Author SHA1 Message Date
Colby Swandale
795370916c
Merge pull request #6 from eregon/initialize-cpu-ivars 2020-05-12 22:51:08 +10:00
Benoit Daloze
e644f89abe Make sure all instance variables of the CPU are initialized
* @halt would trigger a warning.
2020-05-10 14:14:30 +02:00
Benoit Daloze
beb23b537b Remove duplicate assignment to @f and duplicate attr_reader 2020-05-10 14:13:34 +02:00
Artemy Kirienko
c405b41dcb Bump Ruby and dependencies versions 2020-05-09 00:50:49 +03:00
Benoit Daloze
18e62d1722 Remove unused attr_accessor 2017-03-06 10:59:24 +01:00
Benoit Daloze
5d20ab60e6 Add --stackprof to profile with stackprof 2017-03-05 20:00:46 +01:00
Benoit Daloze
cb70d8d451 Desugar loops in PPU#render_bg and extract common shift computation 2017-03-05 19:50:29 +01:00
Benoit Daloze
7991a71cb3 Remove redundant ? true : false 2017-03-05 19:50:29 +01:00
Benoit Daloze
394dfdea5e Avoid calling IO::LCDControl.screen_enabled? twice 2017-03-05 19:50:29 +01:00
Benoit Daloze
b6be04497f Extract loop invariant read 2017-03-05 18:59:59 +01:00
Benoit Daloze
c3e8074f96 Use read_memory_byte for all reads of addresses over 0xFE00 2017-03-05 18:45:04 +01:00
Benoit Daloze
89aaa3e2cb Let Cartridge.new return directly the memory bank controller
* Cartridge does not provide any extra behavior
* Avoids one indirection for every access
2017-03-05 18:27:50 +01:00
Benoit Daloze
8bdd6941ad Avoid allocations in MMU#[] 2017-03-05 18:26:32 +01:00
Benoit Daloze
e774ff97be Add a method to read directly the memory 2017-03-05 18:23:19 +01:00
Benoit Daloze
d4c2f76bc1 Reshape MMU#[] to share to move common accesses first 2017-03-05 18:23:19 +01:00
Benoit Daloze
c1e927fc1d Emulate the boot ROM by chaining it in front of the real cartridge 2017-03-05 18:23:19 +01:00
Benoit Daloze
85d2afe7da Add FPS in window title 2017-03-05 15:06:47 +01:00
Benoit Daloze
7412e69d11 Fix typos in requires
* Case insensitivity is platform-dependent.
2017-03-03 16:16:11 +01:00
Colby Swandale
f095a087a8 fixed unintialized constant in PPU render window 2016-09-28 13:31:11 +10:00
Colby Swandale
91eba849b0 initalize MBC ram bank to 0 2016-09-27 21:09:05 +10:00
Colby Swandale
cb787edf43 simplify MBC ROM spec and make have reader for ROM ram 2016-09-26 23:03:01 +10:00
Colby Swandale
67535cf4c9 fix doc spelling typos and removed doc for removed inaccurate behaviour 2016-09-26 17:29:05 +10:00
Colby Swandale
a145bf8e9f brain fart moment, the PC must always be increments on fetch instruction 2016-09-26 08:46:07 +10:00
Colby Swandale
8b341762e4 fix PC being incorrectly incremented on interrupt and fixed relevent
specs
2016-09-25 19:00:55 +10:00
Colby Swandale
432f869c4e renamed GPU to PPU 2016-09-25 17:36:23 +10:00
Colby Swandale
ca36ba9bfd fixed sprites not being transparent on pixel data 0 2016-09-18 23:28:05 +10:00
Colby Swandale
c67980d5f8 fix incorrect refernce to SCREEN_WIDTH constant in ppu 2016-09-18 23:23:58 +10:00
Colby Swandale
f4bd164e06 removed unused code and more documentation cleanup 2016-09-18 23:14:03 +10:00
Colby Swandale
af1cecef44 small cleanup and fixing up some documentation 2016-09-18 23:01:43 +10:00
Colby
dfc9df2f4f set new default window width 2016-09-01 19:51:03 +10:00
Colby
5ca8892745 enable window resizing 2016-09-01 19:45:02 +10:00
Colby
6f18f30f38 small cleanup 2016-09-01 12:01:29 +10:00
Colby
212406677b implement key controls 2016-09-01 12:01:18 +10:00
Colby
5ee093760d documentation updats 2016-08-19 20:49:36 +10:00
Colby
40eb4829a9 disable input, improve screen implementation 2016-08-14 15:06:17 +10:00
Colby
e311bd6ed1 add map 2016-08-14 15:06:17 +10:00
Colby
6ebe1f2678 fixing some bugs in window draw 2016-08-09 21:51:46 +10:00
Colby
00eec41f53 dont crash when ram is not enabled on cartridge memory read 2016-08-09 20:56:15 +10:00
Colby
b95a41520c implement mbc3 functionality 2016-08-09 20:54:51 +10:00
Colby
b0d024108a fix typo in module name for MBCs 2016-08-09 20:54:25 +10:00
Colby
4ccb749957 fixed incorrect behavior of mbc1 ram access
gameboy will simply not write to memory if memory is not enabled.
2016-08-08 22:06:10 +10:00
Colby
e729181763 fix input not working correctly 2016-08-08 21:16:43 +10:00
Colby
aeab98baaf add support for the joypad 2016-08-02 23:44:46 +10:00
Colby
84c90c4665 re-enable drawing sprites and windows 2016-08-01 20:21:06 +10:00
Colby
03de70423b fix bad offset for ECHO ram, emulate Input and other MMU fixes 2016-08-01 20:05:53 +10:00
Colby
abefb6da56 set STAT register on skip boot 2016-07-31 22:13:28 +10:00
Colby
ba6073aba0 fix screen enable/disable 2016-07-31 22:13:06 +10:00
Colby
bf785c7d54 tiny refactor of update lylc 2016-07-31 22:11:16 +10:00
Colby
322cbffc3c more cleanup 2016-07-31 14:13:28 +10:00
Colby
d632b015c1 rename line gpu line methods 2016-07-31 13:54:59 +10:00