Commit Graph

7 Commits

Author SHA1 Message Date
5bbc6097b5 cpu: fix up register accesses
The HL dereference operations cause problems indexing into the
registers array, because it causes a hole in the array that only
exists in the 8-bit register space.

Instead of accessing the registers directly by the same indices used
in in the assembly instructions, create a lookup table to map between
them.

Signed-off-by: Max Regan <mgregan2@gmail.com>
2017-05-10 22:40:12 -07:00
0268f13080 common: include newline in debug logger
So it isn't necessary to add it each time.

Signed-off-by: Max Regan <mgregan2@gmail.com>
2017-05-10 22:40:12 -07:00
544e4afee8 tests: rename to remove underscores
It makes them more amenable to using their names as the
names of the lcov output reports, which complains about
the dashes.

Signed-Off-By: Max Regan <mgregan2@gmail.com>
2017-05-10 22:40:12 -07:00
681b8e3233 make: clean up coverage builds
Clean up the coverage build output, and add a "config" target for
doing a coverage build.

Signed-off-by: Max Regan <mgregan2@gmail.com>
2017-05-10 22:40:12 -07:00
d25d2d8549 test: add automatic unit test coverage generation
Using lcov, generate an HTML report via "make coverage-report"
describing the coverage of each file. Ideally, this will get added to
an automated testing pipeline.

Signed-off-by: Max Regan <mgregan2@gmail.com>
2017-05-10 22:40:12 -07:00
d9bf91fc5a tri: fix autocomplete when one string is a prefix of another
Also add a bunch of unit tests for all of the various tri functions.

Signed-off-by: Max Regan <mgregan2@gmail.com>
2017-05-10 22:40:12 -07:00
6e2f4096a2 gb-emu: initial commit
Add a mostly non-functional Gameboy CPU and the skeleton
of a Gameboy assembler intended for unit tests.
2017-05-10 22:40:12 -07:00