Skip to content

Commit

Permalink
Sync to the latest EightBit library.
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
  • Loading branch information
MoleskiCoder committed Jan 14, 2019
1 parent e98c7bd commit 7454892
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion libraries/EightBit
Submodule EightBit updated 54 files
+2 −1 Intel8080/inc/Intel8080.h
+51 −51 Intel8080/src/Intel8080.cpp
+14 −9 Intel8080/test/Board.cpp
+4 −3 Intel8080/test/Board.h
+10 −7 LR35902/fusetest_LR35902/FuseTestRunner.cpp
+4 −3 LR35902/fusetest_LR35902/FuseTestRunner.h
+2 −2 LR35902/inc/GameBoyBus.h
+1 −1 LR35902/inc/LR35902.h
+8 −7 LR35902/src/GameBoyBus.cpp
+1 −1 LR35902/src/IoRegisters.cpp
+67 −67 LR35902/src/LR35902.cpp
+1,604 −0 M6502/documentation/64doc.txt
+80 −32 M6502/inc/mos6502.h
+492 −349 M6502/src/mos6502.cpp
+12 −7 M6502/test/Board.cpp
+4 −3 M6502/test/Board.h
+0 −1 M6502/test/test.cpp
+2 −2 M6532/inc/M6532.h
+479 −0 MC6809/documentation/6809cyc.txt
+52 −14 MC6809/inc/mc6809.h
+1 −1 MC6809/src/Disassembly.cpp
+388 −338 MC6809/src/mc6809.cpp
+23 −20 MC6809/test/Board.cpp
+15 −6 MC6809/test/Board.h
+14 −9 MC6809/unittest/Board.cpp
+3 −2 MC6809/unittest/Board.h
+24 −24 MC6809/unittest/mc6809_tests.cpp
+8 −8 MC6850/inc/MC6850.h
+ MC6850/src/MC6850.cpp
+11 −8 Z80/fusetest_Z80/FuseTestRunner.cpp
+4 −3 Z80/fusetest_Z80/FuseTestRunner.h
+18 −4 Z80/inc/Z80.h
+128 −109 Z80/src/Z80.cpp
+15 −11 Z80/test/Board.cpp
+4 −3 Z80/test/Board.h
+5 −6 inc/Bus.h
+4 −23 inc/Chip.h
+24 −0 inc/ClockedChip.h
+35 −0 inc/Device.h
+19 −2 inc/IntelProcessor.h
+14 −0 inc/Mapper.h
+1 −1 inc/MemoryMapping.h
+33 −27 inc/Processor.h
+2 −1 inc/TestHarness.h
+11 −11 src/BigEndianProcessor.cpp
+2 −4 src/Bus.cpp
+2 −6 src/Chip.cpp
+12 −0 src/Device.cpp
+4 −0 src/EightBit.vcxproj
+12 −0 src/EightBit.vcxproj.filters
+18 −2 src/IntelProcessor.cpp
+11 −11 src/LittleEndianProcessor.cpp
+44 −8 src/Processor.cpp
+8 −1 src/Rom.cpp
2 changes: 0 additions & 2 deletions src/Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class Board final : public EightBit::GameBoy::Bus {
Board(const Configuration& configuration);

void plug(const std::string& path);

protected:
virtual void initialise() final;

private:
Expand Down
11 changes: 6 additions & 5 deletions src/Computer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ void Computer::plug(const std::string& path) {
m_board.plug(path);
}

void Computer::powerOn() {
void Computer::raisePOWER() {

m_board.powerOn();
m_board.raisePOWER();
m_board.initialise();

m_window.reset(::SDL_CreateWindow(
"GameBoy",
Expand Down Expand Up @@ -114,8 +115,8 @@ void Computer::powerOn() {
m_startTicks = ::SDL_GetTicks();
}

void Computer::powerOff() {
m_board.powerOff();
void Computer::lowerPOWER() {
m_board.lowerPOWER();
}

void Computer::configureBackground() const {
Expand Down Expand Up @@ -143,7 +144,7 @@ void Computer::run() {
while (::SDL_PollEvent(&e)) {
switch (e.type) {
case SDL_QUIT:
powerOff();
lowerPOWER();
break;
case SDL_KEYDOWN:
handleKeyDown(e.key.keysym.sym);
Expand Down
4 changes: 2 additions & 2 deletions src/Computer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class Computer final {
void run();
void plug(const std::string& path);

void powerOn();
void powerOff();
void raisePOWER();
void lowerPOWER();

private:
static void throwSDLException(std::string failure) {
Expand Down
2 changes: 1 addition & 1 deletion src/gb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int main(int, char*[])

//computer.plug("mooneye/emulator-only/mbc1/multicart_rom_8Mb.gb");

computer.powerOn();
computer.raisePOWER();
try {
computer.run();
} catch (const std::exception& error) {
Expand Down

0 comments on commit 7454892

Please sign in to comment.