Skip to content

Commit

Permalink
Update to v1.1.4 (Tanooki16)
Browse files Browse the repository at this point in the history
- Updated to the latest FCEUX (git 14c2152)
- Updated to the latest FCE Ultra GX 3.5.2
- Added mapper 126 support for Power Joy 84-in-1
- Added option to hide/show "Save RAM" button in save menu (thanks InfiniteBlue!)
- Added credits button in main menu settings (thanks InfiniteBlue!)
- Updated credits
- Updated all language files
- Updated UI PNG images
- Compiled with latest devkitPPC and libfat with UStealth Mod (thanks SaulFabre!)
  • Loading branch information
saulfabregwiivc committed Jun 24, 2022
1 parent 111c8db commit 49bec64
Show file tree
Hide file tree
Showing 34 changed files with 494 additions and 312 deletions.
29 changes: 21 additions & 8 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,26 @@ FCEUX TX is a fork of FCE Ultra GX: https://github.com/dborth/fceugx
Update History
--------------

---FCEUX TX 1.1.4---
---June 23 2022---

- Updated to the latest FCEUX (git 14c2152)
- Updated to the latest FCE Ultra GX 3.5.2
- Added mapper 126 support for Power Joy 84-in-1
- Added option to hide/show "Save RAM" button in save menu (thanks InfiniteBlue!)
- Added credits button in main menu settings (thanks InfiniteBlue!)
- Updated credits
- Updated all language files
- Updated UI PNG images
- Compiled with latest devkitPPC and libfat with UStealth Mod (thanks SaulFabre!)

---FCEUX TX 1.1.3---
---May 17 2022---

- Updated to the latest FCEUX 2.6.4 (git def5768)
- Updated to the latest FCE Ultra GX (git 10b4ff8)
- Added mapper 218 support for Magic Floor
- Restored turbo mode and added button remapping feature and submenu (thanks InfiniteBlueGX)
- Restored turbo mode and added button remapping feature and submenu (thanks InfiniteBlue!)
- Added option to choose sound quality (Low/High/Highest) in audio settings
- Added option to turn it on/off low pass filtering in audio settings to simulate NES RF sound
- Added SMB Game & Watch color palette
Expand All @@ -36,7 +49,7 @@ Update History
- Added Digital Prime color palette by FBX and rename Smootz to Smooth V2
- Replaced old PAL color palette by that of r57Shell (more accurate)
- Removed rumble function from menu (your batteries will last longer)
- Updated Korean translation (thanks DDinghoya)
- Updated Korean translation (thanks DDinghoya!)
- Updated UI PNG images
- Compiled with latest devkitPPC/libogc
- Updated Forwarder Channel (1.5)
Expand Down Expand Up @@ -70,7 +83,7 @@ Update History
- Updated to the latest FCEUX 2.3.0 (git c544c13)
- Updated to the latest FCE Ultra GX 3.5.0 (git 373e12b)
- Removed SMB support (SMB 1.0 has a major security issue due to flaws in the protocol)
- Added Mayflash 2-port Snes USB adapter support (thanks EthanArmbrust)
- Added Mayflash 2-port Snes USB adapter support (thanks EthanArmbrust!)
- Removed Retrode 2 and Hornet USB controller support (not really useful for Wii)
- Removed PocketNES interoperability
- Removed Dendy support (priority to PAL 576i/288p video mode which does not suit Dendy mode)
Expand All @@ -81,7 +94,7 @@ Update History
- Reverted moved app version in credits box info
- Reworked UI PNG images (improved colors, shadow effects and logo)
- Added option to turn it on/off swap duty cycles to simulate sound of some NES clones
- Added audio settings in game menu (thanks Bladeoner)
- Added audio settings in game menu (thanks Bladeoner!)
- Removed menu music (use a bg_music.ogg file in root fceuxtx folder)
- Updated French translation
- Changed root folder name to fceuxtx
Expand Down Expand Up @@ -148,7 +161,7 @@ Update History
---December 28 2019---

- Updated to the latest FCE Ultra GX (git a8caf23)
- Added Restored Wii VC color palette (thanks SuperrSonic)
- Added Restored Wii VC color palette (thanks SuperrSonic!)
restored version adjusts brightness levels significantly
- Updated to the latest FCEUX (git 0b4be4b)
- Updated UI color and added Wii/vWii Forwarder Channel (1.1)
Expand All @@ -159,7 +172,7 @@ Update History

- Updated to the latest FCEUX (git 88d7f39)
- Added vWii Forwarder Channel for Wii U
- Updated PPU color palettes from FCEUmm (libretro)
- Updated PPU color palettes (libretro fceumm)
- Added A+B+START trigger to go back to menu with Classic Controller
work with NES/Snes Classic Mini controllers
- Fixed dialogue box text color to screen position and controller settings
Expand All @@ -170,9 +183,9 @@ Update History

- Added separate PAL audio sample rate
- Increased sound volume in games
- Added Retrode support (thanks revvv)
- Added Retrode support (thanks revvv!)
- Changed default mapping of buttons A and B
- Added button mapping for NES Zapper (thanks niuus)
- Added button mapping for NES Zapper (thanks niuus!)
- Corrected the PAL noise frequency table
- Added all PAL regions detection
- Removed PAL 60Hz video mode
Expand Down
4 changes: 2 additions & 2 deletions hbc/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<app version="1">
<name>FCEUX TX</name>
<coder>Tanooki</coder>
<version>1.1.3</version>
<release_date>20220517</release_date>
<version>1.1.4</version>
<release_date>20220623</release_date>
<short_description>NES/Famicom Emulator</short_description>
<long_description>FCEUX TX is a fork of FCE Ultra GX on Wii.</long_description>
<ahb_access />
Expand Down
102 changes: 102 additions & 0 deletions source/fceux/boards/126.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2019
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "mapinc.h"
#include "mmc3.h"

static uint16 GetExChrExBank() {
uint16 bank = (uint16)EXPREGS[0];
return ((~bank << 0 & 0x080 & ((uint16)EXPREGS[2])) | (bank << 4 & 0x080 & bank) |
(bank << 3 & 0x100) | (bank << 5 & 0x200));
}

static void UpdateChrBank(void) {
uint16 bank = (uint16)EXPREGS[2] & 0x0F;
bank |= GetExChrExBank() >> 3;
setchr8(bank);
}

static void M126CW(uint32 A, uint8 V) {
if (!(EXPREGS[3] & 0x10)) {
uint16 bank = (uint16)V & (((uint16)EXPREGS[0] & 0x80) - 1);
bank |= GetExChrExBank();
setchr1(A, bank);
}
}

static void M126PW(uint32 A, uint8 V) {
uint16 bank = (uint16)V;
uint16 preg = (uint16)EXPREGS[0];
bank &= ((~preg >> 2) & 0x10) | 0x0F;
bank |= ((preg & (0x06 | (preg & 0x40) >> 6)) << 4) | ((preg & 0x10) << 3);
if (!(EXPREGS[3] & 0x03))
setprg8(A, bank);
else if ((A - 0x8000) == ((MMC3_cmd << 8) & 0x4000)) { /* TODO: Clean this */
if ((EXPREGS[3] & 0x3) == 0x3)
setprg32(0x8000, (bank >> 2));
else {
setprg16(0x8000, (bank >> 1));
setprg16(0xc000, (bank >> 1));
}
}
}

static DECLFW(M126Write) {
A &= 0x03;
if(A == 0x01 || A == 0x02 || ((A == 0x00 || A == 0x03) && !(EXPREGS[3] & 0x80))) {
if (EXPREGS[A] != V) {
EXPREGS[A] = V;
if (EXPREGS[3] & 0x10)
UpdateChrBank();
else
FixMMC3CHR(MMC3_cmd);
FixMMC3PRG(MMC3_cmd);
}
}
}

void M126StateRestore(int v) {
FixMMC3CHR(MMC3_cmd);
FixMMC3PRG(MMC3_cmd);

if (EXPREGS[3] & 0x10)
UpdateChrBank();
}

static void M126Reset(void) {
EXPREGS[0] = EXPREGS[1] = EXPREGS[2] = EXPREGS[3] = 0;
MMC3RegReset();
}

static void M126Power(void) {
EXPREGS[0] = EXPREGS[1] = EXPREGS[2] = EXPREGS[3] = 0;
GenMMC3Power();
SetWriteHandler(0x6000, 0x7FFF, M126Write);
}

void Mapper126_Init(CartInfo *info) {
GenMMC3_Init(info, 2048, 1023, 0, 0);
cwrap = M126CW;
pwrap = M126PW;
info->Power = M126Power;
info->Reset = M126Reset;
GameStateRestore = M126StateRestore;
AddExState(EXPREGS, 4, 0, "EXPR");
}
3 changes: 0 additions & 3 deletions source/fceux/boards/218.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#include "mapinc.h"
#include "../ines.h"

static uint8 mirror;
static uint8 mask;

static void M218Power(void) {
setchr8(0);
setprg32(0x8000, 0);
Expand Down
69 changes: 58 additions & 11 deletions source/fceux/boards/235.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,79 @@
*/

#include "mapinc.h"
#include "../ines.h"

static uint16 cmdreg = 0;
static uint8 openbus = 0;

// For carts with extra 128K prg rom (Contra)
static uint8 unrom = 0;
static uint8 unromData = 0;

static uint32 PRGROMSize = 0;

static uint16 cmdreg;
static SFORMAT StateRegs[] =
{
{ &cmdreg, 2, "CREG" },
{ &openbus, 1, "OB" },
{ &unrom, 1, "UROM" },
{ &unromData, 1, "UDTA" },
{ 0 }
};

static void Sync(void) {
if (cmdreg & 0x400)
setmirror(MI_0);
else
setmirror(((cmdreg >> 13) & 1) ^ 1);
if (cmdreg & 0x800) {
setprg16(0x8000, ((cmdreg & 0x300) >> 3) | ((cmdreg & 0x1F) << 1) | ((cmdreg >> 12) & 1));
setprg16(0xC000, ((cmdreg & 0x300) >> 3) | ((cmdreg & 0x1F) << 1) | ((cmdreg >> 12) & 1));
} else
setprg32(0x8000, ((cmdreg & 0x300) >> 4) | (cmdreg & 0x1F));
if (unrom) {
int PRGPageCount = PRGROMSize / (16 * 1024);
setprg16(0x8000, PRGPageCount & 0xC0 | (unromData & 7));
setprg16(0xC000, PRGPageCount & 0xC0 | 7);
setmirror(MI_V);
} else {
uint8 bank = ((cmdreg & 0x300) >> 3) | (cmdreg & 0x1F);
if (bank >= (PRGROMSize / (32 * 1024))) {
openbus = 1;
} else {
if (cmdreg & 0x400)
setmirror(MI_0);
else
setmirror(((cmdreg >> 13) & 1) ^ 1);
if (cmdreg & 0x800) {
setprg16(0x8000, (bank << 1) | ((cmdreg >> 12) & 1));
setprg16(0xC000, (bank << 1) | ((cmdreg >> 12) & 1));
} else
setprg32(0x8000, bank);
}
}
}

static DECLFR(M235Read) {
if (openbus) {
openbus = 0;
return X.DB;
}
return CartBR(A);
}

static DECLFW(M235Write) {
cmdreg = A;
unromData = V;
Sync();
}

static void M235Reset(void) {
cmdreg = 0;
unromData = 0;
if (PRGROMSize & 0x20000)
unrom = (unrom + 1) & 1;
Sync();
}

static void M235Power(void) {
setchr8(0);
SetWriteHandler(0x8000, 0xFFFF, M235Write);
SetReadHandler(0x8000, 0xFFFF, CartBR);
SetReadHandler(0x8000, 0xFFFF, M235Read);
cmdreg = 0;
unromData = 0;
unrom = 0;
Sync();
}

Expand All @@ -57,7 +100,11 @@ static void M235Restore(int version) {
}

void Mapper235_Init(CartInfo *info) {
info->Reset = M235Reset;
info->Power = M235Power;
GameStateRestore = M235Restore;
AddExState(&StateRegs, ~0, 0, 0);

// needs raw, non-pow2 PRGROM size for comparison
PRGROMSize = head.ROM_size * 16384;
}
36 changes: 27 additions & 9 deletions source/fceux/fds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,23 @@ void FCEU_FDSSelect(void)
FCEU_DispMessage("", 0); //FCEU_DispMessage("Disk %d Side %c Selected", 0, SelectDisk >> 1, (SelectDisk & 1) ? 'B' : 'A');
}

#define IRQ_Repeat (IRQa & 0x01)
#define IRQ_Enabled (IRQa & 0x02)
#define IRQ_Repeat 0x01
#define IRQ_Enabled 0x02

static void FDSFix(int a) {
if ((IRQa & IRQ_Enabled) && IRQCount) {
if (IRQa & IRQ_Enabled) {
IRQCount -= a;
if (IRQCount <= 0) {
IRQCount = IRQLatch;
/* Puff Puff Golf notes:
Game freezes while music playing ingame after inserting Disk Side B.
IRQ is usually fired at scanline 169 and 183 for music to work.
At some point after inserting disk B, an IRQ is fired at scanline 174 which
will just freeze game while music plays.
If you ignore triggering IRQ altogether, game plays but no music
*/
X6502_IRQBegin(FCEU_IQEXT);
if (!(IRQa & IRQ_Repeat)) {
IRQa &= ~IRQ_Enabled;
Expand Down Expand Up @@ -578,21 +587,30 @@ void FDSSoundReset(void) {
static DECLFW(FDSWrite) {
switch (A) {
case 0x4020:
X6502_IRQEnd(FCEU_IQEXT);
IRQLatch &= 0xFF00;
IRQLatch |= V;
break;
case 0x4021:
X6502_IRQEnd(FCEU_IQEXT);
IRQLatch &= 0xFF;
IRQLatch |= V << 8;
break;
case 0x4022:
X6502_IRQEnd(FCEU_IQEXT);
IRQCount = IRQLatch;
IRQa = V & 3;
if (FDSRegs[3] & 1) {
IRQa = V & 0x03;
if (IRQa & IRQ_Enabled) {
IRQCount = IRQLatch;
} else {
X6502_IRQEnd(FCEU_IQEXT);
}
}
break;
case 0x4023:
if (!(V & 0x01)) {
IRQa &= ~IRQ_Enabled;
X6502_IRQEnd(FCEU_IQEXT);
X6502_IRQEnd(FCEU_IQEXT2);
}
break;
case 0x4023: break;
case 0x4024:
if (mapperFDS_diskinsert && ~mapperFDS_control & 0x04) {

Expand Down
15 changes: 0 additions & 15 deletions source/fceux/fir/Makefile

This file was deleted.

Loading

0 comments on commit 49bec64

Please sign in to comment.