Merge pull request #499 from negativeExponent/cleanup

Cleanup
This commit is contained in:
Autechre
2022-02-26 22:37:43 +01:00
committed by GitHub
5 changed files with 16 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
/* FCEUmm - NES/Famicom Emulator /* FCEUmm - NES/Famicom Emulator
* *
* Copyright notice for this file: * Copyright notice for this file:
* Copyright (C) 2020 negativeExponent * Copyright (C) 2022
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by

View File

@@ -24,16 +24,16 @@
#include "mmc3.h" #include "mmc3.h"
static void M432CW(uint32 A, uint8 V) { static void M432CW(uint32 A, uint8 V) {
int chrAND = EXPREGS[1] &0x04? 0x7F: 0xFF; int chrAND = (EXPREGS[1] & 0x04) ? 0x7F : 0xFF;
int chrOR = EXPREGS[1] <<7 &0x080 | EXPREGS[1] <<5 &0x100; int chrOR = (EXPREGS[1] << 7) & 0x080 | (EXPREGS[1] << 5) & 0x100;
setchr1(A, V &chrAND | chrOR &~chrAND); setchr1(A, (V & chrAND) | (chrOR & ~chrAND));
} }
static void M432PW(uint32 A, uint8 V) { static void M432PW(uint32 A, uint8 V) {
int prgAND = EXPREGS[1] &0x02? 0x0F: 0x1F; int prgAND = (EXPREGS[1] & 0x02) ? 0x0F : 0x1F;
int prgOR = EXPREGS[1] <<4 &0x10 | EXPREGS[1] <<1 &0x20; int prgOR = ((EXPREGS[1] << 4) & 0x10) | (EXPREGS[1] << 1) & 0x20;
if (A <0xC000 || ~EXPREGS[1] &0x40) setprg8(A, V &prgAND | prgOR &~prgAND); if ((A < 0xC000) || (~EXPREGS[1] & 0x40)) setprg8(A, (V & prgAND) | (prgOR & ~prgAND));
if (A <0xC000 && EXPREGS[1] &0x40) setprg8(A |0x4000, V &prgAND | prgOR &~prgAND); if ((A < 0xC000) && (EXPREGS[1] & 0x40)) setprg8(A | 0x4000, (V & prgAND) | (prgOR & ~prgAND));
} }
static DECLFR(M432Read) { static DECLFR(M432Read) {

View File

@@ -1,7 +1,7 @@
/* FCEUmm - NES/Famicom Emulator /* FCEUmm - NES/Famicom Emulator
* *
* Copyright notice for this file: * Copyright notice for this file:
* Copyright (C) 2020 negativeExponent * Copyright (C) 2022
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by

View File

@@ -1,7 +1,7 @@
/* FCEUmm - NES/Famicom Emulator /* FCEUmm - NES/Famicom Emulator
* *
* Copyright notice for this file: * Copyright notice for this file:
* Copyright (C) 2020 negativeExponent * Copyright (C) 2022
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by