From e7ddf984be0f97958f29154642700ef6b7acc57f Mon Sep 17 00:00:00 2001 From: Artur Bekker Date: Sat, 26 Nov 2022 14:47:52 -0500 Subject: [PATCH 1/5] Delete CloseEmu.lua Temp deletion, file being moved to output/luaScripts --- output/CloseEmu.lua | 1 - 1 file changed, 1 deletion(-) delete mode 100644 output/CloseEmu.lua diff --git a/output/CloseEmu.lua b/output/CloseEmu.lua deleted file mode 100644 index feeafdbe..00000000 --- a/output/CloseEmu.lua +++ /dev/null @@ -1 +0,0 @@ -emu.exit() From 9daf18360ca807f4f365a534aa4878b25bb7271f Mon Sep 17 00:00:00 2001 From: Artur Bekker Date: Sat, 26 Nov 2022 14:48:39 -0500 Subject: [PATCH 2/5] Create CloseEmu.lua Moved from /output to /output/luaScripts --- output/luaScripts/CloseEmu.lua | 1 + 1 file changed, 1 insertion(+) create mode 100644 output/luaScripts/CloseEmu.lua diff --git a/output/luaScripts/CloseEmu.lua b/output/luaScripts/CloseEmu.lua new file mode 100644 index 00000000..feeafdbe --- /dev/null +++ b/output/luaScripts/CloseEmu.lua @@ -0,0 +1 @@ +emu.exit() From d153d5182df4242c964e0ff43c9f1a1b2f6b9d8d Mon Sep 17 00:00:00 2001 From: Artur Bekker Date: Sat, 26 Nov 2022 14:49:47 -0500 Subject: [PATCH 3/5] Create closeRom.lua Created lua script to utilize newly made function which unloads a ROM from the machine --- output/luaScripts/closeRom.lua | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 output/luaScripts/closeRom.lua diff --git a/output/luaScripts/closeRom.lua b/output/luaScripts/closeRom.lua new file mode 100644 index 00000000..fb56beeb --- /dev/null +++ b/output/luaScripts/closeRom.lua @@ -0,0 +1,2 @@ +emu.closeRom() +emu.print("ROM Unloaded") From 334294a06e7f71d9514183fa72279f7ab00cc8c6 Mon Sep 17 00:00:00 2001 From: Artur Bekker Date: Sat, 26 Nov 2022 14:54:11 -0500 Subject: [PATCH 4/5] Update lua-engine.cpp Added functionality for unloading a ROM. utilizing a function present in "window.cpp", a new Lua function was added to the emu API to allow Lua scripts to close out of games without having to close out of the whole emulator. --- src/lua-engine.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lua-engine.cpp b/src/lua-engine.cpp index 61c21fce..7308ac12 100644 --- a/src/lua-engine.cpp +++ b/src/lua-engine.cpp @@ -645,6 +645,13 @@ static int emu_insertOrEjectDisk(lua_State* L) return 0; } +// emu.closeRom() +// Closes out of currently running ROM to allow user to switch games +static int emu_closeRom(lua_State* L) +{ + CloseGame(); + return 0; +} // emu.loadrom(string filename) // @@ -6089,6 +6096,7 @@ static const struct luaL_reg emulib [] = { {"getdir", emu_getdir}, {"switchDisk", emu_switchDisk}, {"insertOrEjectDisk", emu_insertOrEjectDisk}, + {"closeRom", emu_closeRom}, {"loadrom", emu_loadrom}, {"print", print}, // sure, why not {"exit", emu_exit}, // useful for run-and-close scripts From c8b755545b33dd07011a620ff703b14eebce7442 Mon Sep 17 00:00:00 2001 From: Artur Bekker Date: Sat, 26 Nov 2022 17:55:26 -0500 Subject: [PATCH 5/5] Update readme.md Customized readme to be specific for Emu-Gators FCEUX project, and added instructions so that any user can easily set-up and use our current build of FCEUX. --- readme.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/readme.md b/readme.md index f8d0c4a8..1b2ff6c2 100644 --- a/readme.md +++ b/readme.md @@ -1,21 +1,20 @@ -# fceux [![Build status](https://ci.appveyor.com/api/projects/status/github/TASEmulators/fceux?branch=master&svg=true)](https://ci.appveyor.com/project/zeromus/fceux) +# Emu-Gators FCEUX [![Build status](https://ci.appveyor.com/api/projects/status/github/TASEmulators/fceux?branch=master&svg=true)](https://ci.appveyor.com/project/zeromus/fceux) An open source NES Emulator for Windows and Unix that features solid emulation accuracy and state of the art tools for power users. For some reason casual gamers use it too. -## Builds and Releases +Our goal is to customize FCEUX in order to deliver users a more realistic experience when playing games utilizing the Famicom Disk System. -Interim builds: -* Win32: [fceux-win32.zip](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win32.zip) -* Win64: [fceux-win64.zip](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win64.zip) -* Win64 Qt/SDL: [fceux-win64-QtSDL.zip](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win64-QtSDL.zip) -* Ubuntu: [fceux-ubuntu-x64.deb](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-ubuntu-x64.deb) -* MacOSX: [fceux-Darwin.dmg](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-Darwin.dmg) -* Status: [Appveyor](https://ci.appveyor.com/project/zeromus/fceux/) +## Build Instructions +The recommended way to build this repository is to clone and build it directly in Visual Studio. If you choose to do this, you will also need the Windows XP toolset. If it is not installed, go to "Tools" > "Get Tools and Features". Select "Individual Components" and then install "C++ Windows XP Support for VS 2017 (v141) tools". These solution files will compile FCEUX and some included libraries for full functionality. -But you might like mesen more: https://github.com/SourMesen/Mesen +You will also need to have "lua51.dll" in your system environment variables in order to be able to run Lua scripts. This can be done by downloading Lua 5.1.5 from the following link - -You should get releases from here: https://sourceforge.net/projects/fceultra/files/ +https://sourceforge.net/projects/luabinaries/files/5.1.5/Tools%20Executables/lua-5.1.5_Win64_bin.zip/download -That's because github forces us to use tags we don't have for releases. +Once it is downloaded, unzip the files to a new folder somewhere on your computer. We recommend placing it in "Program Files". Next you will need to copy the path of this folder to your system environment variables (if placed in Program Files, the path will be something like "C:\Program Files\Lua"). Next, right-click the Windows icon in the bottom-left corner of your screen, and select "System". On this page, scroll down to the "Related settings" heading and select "Advanced system settings". On this page, click the "Environment Variables..." button. In this window, scroll down in the box labeled "System variables" until you reach "Path". Double click this line and you will see another window pop up, listing all your environment variables. Here press "New", and you will see another line get added. On this line, paste in the path of the Lua folder created earlier, and press "OK. Then press "OK" on the previous window, after which you will press "OK" on the intial window and the setup will be finished. -2.6.4 is the most recent release but most people are using the autobuilds. +Finally, in order to be able to run games utilizing the Famicom Disk System, which is the entire basis of our project, you will need to have the "disksys.rom" BIOS in the same directory as your executable fceux build. This can be found rather easily online, but the following link provides a version that can be opened and extracted using the 7-Zip Console - + +https://www.mediafire.com/file/35cpj3ghyxeq34o/FamicomDiskSystemBIOS.rar/file + +After building, in your cloned repository, navigate to the folder where your executable is found. If you built in Debug mode with x64 architecture, it should be in "fceux/vc/x64/Debug". Then, simply copy/extract the "disksys.rom" file into this directory, and you're all set to play Famicom Disk System games.