-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4c145f0
Showing
116 changed files
with
25,126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.d | ||
*.o | ||
nes_icon.cpp | ||
nes_icon.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include apps/nes/nofrendo/Makefile | ||
|
||
apps += NES::App | ||
app_headers += apps/nes/app.h | ||
|
||
app_objs += $(addprefix apps/nes/,\ | ||
app.o\ | ||
nes_controller.o\ | ||
nes_view.o\ | ||
) | ||
|
||
app_images += apps/nes/nes_icon.png | ||
|
||
i18n_files += $(addprefix apps/nes/,\ | ||
base.de.i18n\ | ||
base.en.i18n\ | ||
base.es.i18n\ | ||
base.fr.i18n\ | ||
base.pt.i18n\ | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# numworks-nofrendo | ||
|
||
A NES emulator for the NumWorks calculator | ||
|
||
## Easy Installation | ||
|
||
See here : https://zardam.github.io/webnofrendo/ | ||
|
||
## How to build | ||
|
||
```bash | ||
git clone https://github.com/numworks/epsilon.git | ||
cd epsilon | ||
git clone https://github.com/zardam/numworks-nofrendo.git apps/nes | ||
make EPSILON_APPS='calculation graph code statistics probability solver sequence regression settings nes' epsilon.bin | ||
cat your_nes_rom.nes >> epsilon.bin | ||
make EPSILON_APPS='calculation graph code statistics probability solver sequence regression settings nes' epsilon_flash | ||
``` | ||
|
||
## Controls | ||
|
||
| Calculator | NES | | ||
|------------|--------| | ||
| Up | Up | | ||
| Down | Down | | ||
| Left | Left | | ||
| Right | Right | | ||
| Back | A | | ||
| OK | B | | ||
| Up | Start | | ||
| OnOff | Select | | ||
| BackSpace | Reset | | ||
| Any other | Exit | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#include "app.h" | ||
#include "../i18n.h" | ||
#include "../apps_container.h" | ||
#include "nes_icon.h" | ||
|
||
extern "C" { | ||
#include <assert.h> | ||
#include <epsilon/nofrendo_wrapper.h> | ||
} | ||
|
||
namespace NES { | ||
|
||
I18n::Message App::Descriptor::name() { | ||
return I18n::Message::NES; | ||
} | ||
|
||
I18n::Message App::Descriptor::upperName() { | ||
return I18n::Message::NESCapital; | ||
} | ||
|
||
const Image * App::Descriptor::icon() { | ||
return ImageStore::NesIcon; | ||
} | ||
|
||
App::Descriptor * App::Snapshot::descriptor() { | ||
static Descriptor descriptor; | ||
return &descriptor; | ||
} | ||
|
||
App * App::Snapshot::unpack(Container * container) { | ||
return new (container->currentAppBuffer()) App(container, this); | ||
} | ||
|
||
App::Snapshot::Snapshot(){ | ||
} | ||
|
||
void App::didBecomeActive(Window * window) { | ||
::App::didBecomeActive(window); | ||
|
||
NofrendoWrapper nofrendoWrapper; | ||
nofrendoWrapper.run(); | ||
|
||
m_appsContainer->switchTo(m_appsContainer->appSnapshotAtIndex(0)); | ||
} | ||
|
||
void App::willBecomeInactive() { | ||
::App::willBecomeInactive(); | ||
} | ||
|
||
App::App(Container * container, Snapshot * snapshot) : | ||
::App(container, snapshot, &m_nesController), | ||
m_appsContainer((AppsContainer*) container) | ||
{ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef NES_APP_H | ||
#define NES_APP_H | ||
|
||
#include <escher.h> | ||
#include "nes_controller.h" | ||
|
||
class AppsContainer; | ||
|
||
namespace NES { | ||
|
||
class App : public ::App { | ||
public: | ||
class Descriptor : public ::App::Descriptor { | ||
public: | ||
I18n::Message name() override; | ||
I18n::Message upperName() override; | ||
const Image * icon() override; | ||
}; | ||
class Snapshot : public ::App::Snapshot { | ||
public: | ||
Snapshot(); | ||
App * unpack(Container * container) override; | ||
Descriptor * descriptor() override; | ||
}; | ||
virtual void didBecomeActive(Window * window); | ||
virtual void willBecomeInactive(); | ||
private: | ||
App(Container * container, Snapshot * snapshot); | ||
NesController m_nesController; | ||
AppsContainer * m_appsContainer; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NES = "NES" | ||
NESCapital = "NES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NES = "NES" | ||
NESCapital = "NES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NES = "NES" | ||
NESCapital = "NES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NES = "NES" | ||
NESCapital = "NES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NES = "NES" | ||
NESCapital = "NES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "nes_controller.h" | ||
|
||
namespace NES { | ||
|
||
NesController::NesController() : | ||
ViewController(nullptr), | ||
m_view() | ||
{ | ||
} | ||
|
||
View * NesController::view() { | ||
return &m_view; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef NES_CONTROLLER_H | ||
#define NES_CONTROLLER_H | ||
|
||
#include <escher.h> | ||
#include "nes_view.h" | ||
|
||
class AppsContainer; | ||
|
||
namespace NES { | ||
|
||
class NesController : public ViewController { | ||
public: | ||
NesController(); | ||
View * view() override; | ||
private: | ||
NesView m_view; | ||
}; | ||
|
||
} | ||
|
||
#endif |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "nes_view.h" | ||
#include <assert.h> | ||
|
||
namespace NES { | ||
|
||
NesView::NesView() : | ||
View() | ||
{ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef APPS_NES_VIEW_H | ||
#define APPS_NES_VIEW_H | ||
|
||
#include <escher.h> | ||
|
||
namespace NES { | ||
|
||
class NesView : public View { | ||
public: | ||
NesView(); | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
NES_ROM ?= apps/nes/nofrendo/epsilon/2048.nes | ||
SFLAGS += -Iapps/nes/nofrendo -Iapps/nes/nofrendo/nes -Iapps/nes/nofrendo/sndhrdw -Iapps/nes/nofrendo/libsnss -Iapps/nes/nofrendo/cpu | ||
nof_objs = $(addprefix apps/nes/nofrendo/,\ | ||
bitmap.o\ | ||
config.o\ | ||
cpu/dis6502.o\ | ||
cpu/nes6502.o\ | ||
event.o\ | ||
libsnss/libsnss.o\ | ||
log.o\ | ||
mappers/map000.o\ | ||
mappers/map001.o\ | ||
mappers/map002.o\ | ||
mappers/map003.o\ | ||
mappers/map004.o\ | ||
mappers/map005.o\ | ||
mappers/map007.o\ | ||
mappers/map008.o\ | ||
mappers/map009.o\ | ||
mappers/map011.o\ | ||
mappers/map015.o\ | ||
mappers/map016.o\ | ||
mappers/map018.o\ | ||
mappers/map019.o\ | ||
mappers/map024.o\ | ||
mappers/map032.o\ | ||
mappers/map033.o\ | ||
mappers/map034.o\ | ||
mappers/map040.o\ | ||
mappers/map041.o\ | ||
mappers/map042.o\ | ||
mappers/map046.o\ | ||
mappers/map050.o\ | ||
mappers/map064.o\ | ||
mappers/map065.o\ | ||
mappers/map066.o\ | ||
mappers/map070.o\ | ||
mappers/map073.o\ | ||
mappers/map075.o\ | ||
mappers/map078.o\ | ||
mappers/map079.o\ | ||
mappers/map085.o\ | ||
mappers/map087.o\ | ||
mappers/map093.o\ | ||
mappers/map094.o\ | ||
mappers/map099.o\ | ||
mappers/map160.o\ | ||
mappers/map229.o\ | ||
mappers/map231.o\ | ||
mappers/mapvrc.o\ | ||
memguard.o\ | ||
nes/mmclist.o\ | ||
nes/nes.o\ | ||
nes/nesinput.o\ | ||
nes/nes_mmc.o\ | ||
nes/nes_pal.o\ | ||
nes/nes_ppu.o\ | ||
nes/nes_rom.o\ | ||
nes/nesstate.o\ | ||
sndhrdw/fds_snd.o\ | ||
sndhrdw/mmc5_snd.o\ | ||
sndhrdw/nes_apu.o\ | ||
sndhrdw/vrcvisnd.o\ | ||
nofrendo.o\ | ||
epsilon/nofrendo_wrapper.o\ | ||
epsilon/osd_epsilon.o\ | ||
epsilon/stubs.o\ | ||
) | ||
|
||
ifneq ($(PLATFORM),device) | ||
nof_objs += $(addprefix apps/nes/nofrendo/,\ | ||
epsilon/rom.o\ | ||
) | ||
apps/nes/nofrendo/epsilon/rom.c: FORCE | ||
@echo "BIN $@" | ||
$(Q) echo "const unsigned char _rom_data[] = {" > $@ | ||
$(Q) cat "$(NES_ROM)" | xxd -i >> $@ | ||
$(Q) echo "};" >> $@ | ||
|
||
FORCE: | ||
|
||
products += apps/nes/nofrendo/epsilon/rom.c | ||
endif | ||
|
||
$(nof_objs): SFLAGS := $(subst -Os,-O2,$(SFLAGS)) | ||
|
||
objs += $(nof_objs) |
Oops, something went wrong.