apply changes made during brief timespan in new (abandoned) svn repository:
* support mapper 176. mapper 176 no longer maps to BMCFK23C. BMCFK23C is still accessible through crc or unif? test case would be welcome. it is unclear to me why mapper 176 control was removed from 176.cpp and given to BMCFK23C * fix malformed ines.cpp file format * gtk: bump about date to 2012 * Taseditor: fixed silly bug with JumpToFrame * Taseditor: autosave works only when project has a filename * Taseditor: small fixes
This commit is contained in:
parent
c212306e7c
commit
181278b136
|
@ -2,6 +2,7 @@
|
|||
*
|
||||
* Copyright notice for this file:
|
||||
* Copyright (C) 2007 CaH4e3
|
||||
* Copyright (C) 2012 FCEUX team
|
||||
*
|
||||
* 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
|
||||
|
@ -20,44 +21,116 @@
|
|||
|
||||
#include "mapinc.h"
|
||||
|
||||
static uint8 prg, chr;
|
||||
extern uint32 ROM_size;
|
||||
|
||||
static uint8 prg[4], chr, sbw, we_sram;
|
||||
static uint8 *WRAM=NULL;
|
||||
static uint32 WRAMSIZE;
|
||||
|
||||
static SFORMAT StateRegs[]=
|
||||
{
|
||||
{&prg, 1, "PRG"},
|
||||
{prg, 4, "PRG"},
|
||||
{&chr, 1, "CHR"},
|
||||
{&sbw, 1, "SBW"},
|
||||
{0}
|
||||
};
|
||||
|
||||
static void Sync(void)
|
||||
{
|
||||
setprg8r(0x10,0x6000,0);
|
||||
setprg32(0x8000,prg>>1);
|
||||
setprg8(0x8000,prg[0]);
|
||||
setprg8(0xA000,prg[1]);
|
||||
setprg8(0xC000,prg[2]);
|
||||
setprg8(0xE000,prg[3]);
|
||||
|
||||
setchr8(chr);
|
||||
}
|
||||
|
||||
static DECLFW(M176Write1)
|
||||
static DECLFW(M176Write_5001)
|
||||
{
|
||||
prg = V;
|
||||
if(sbw)
|
||||
{
|
||||
prg[0] = V*4;
|
||||
prg[1] = V*4+1;
|
||||
prg[2] = V*4+2;
|
||||
prg[3] = V*4+3;
|
||||
}
|
||||
Sync();
|
||||
}
|
||||
|
||||
static DECLFW(M176Write2)
|
||||
static DECLFW(M176Write_5010)
|
||||
{
|
||||
if(V == 0x24) sbw = 1;
|
||||
Sync();
|
||||
}
|
||||
|
||||
static DECLFW(M176Write_5011)
|
||||
{
|
||||
V >>= 1;
|
||||
if(sbw)
|
||||
{
|
||||
prg[0] = V*4;
|
||||
prg[1] = V*4+1;
|
||||
prg[2] = V*4+2;
|
||||
prg[3] = V*4+3;
|
||||
}
|
||||
Sync();
|
||||
}
|
||||
|
||||
static DECLFW(M176Write_5FF1)
|
||||
{
|
||||
V >>= 1;
|
||||
prg[0] = V*4;
|
||||
prg[1] = V*4+1;
|
||||
prg[2] = V*4+2;
|
||||
prg[3] = V*4+3;
|
||||
Sync();
|
||||
}
|
||||
|
||||
static DECLFW(M176Write_5FF2)
|
||||
{
|
||||
chr = V;
|
||||
Sync();
|
||||
}
|
||||
|
||||
static DECLFW(M176Write_A001)
|
||||
{
|
||||
we_sram = V & 0x03;
|
||||
}
|
||||
|
||||
static DECLFW(M176Write_WriteSRAM)
|
||||
{
|
||||
// if(we_sram)
|
||||
CartBW(A,V);
|
||||
}
|
||||
|
||||
static void M176Power(void)
|
||||
{
|
||||
prg = ~0;
|
||||
SetReadHandler(0x6000,0x7fff,CartBR);
|
||||
SetWriteHandler(0x6000,0x7fff,CartBW);
|
||||
SetWriteHandler(0x6000,0x7fff,M176Write_WriteSRAM);
|
||||
SetReadHandler(0x8000,0xFFFF,CartBR);
|
||||
SetWriteHandler(0x5ff1,0x5ff1,M176Write1);
|
||||
SetWriteHandler(0x5ff2,0x5ff2,M176Write2);
|
||||
SetWriteHandler(0xA001,0xA001,M176Write_A001);
|
||||
SetWriteHandler(0x5001,0x5001,M176Write_5001);
|
||||
SetWriteHandler(0x5010,0x5010,M176Write_5010);
|
||||
SetWriteHandler(0x5011,0x5011,M176Write_5011);
|
||||
SetWriteHandler(0x5ff1,0x5ff1,M176Write_5FF1);
|
||||
SetWriteHandler(0x5ff2,0x5ff2,M176Write_5FF2);
|
||||
|
||||
we_sram = 0;
|
||||
sbw = 0;
|
||||
prg[0] = 0;
|
||||
prg[1] = 1;
|
||||
if(ROM_size > 32)
|
||||
{
|
||||
prg[2] = ROM_size-2;
|
||||
prg[3] = ROM_size-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
prg[2] = ROM_size*2-2;
|
||||
prg[3] = ROM_size*2-1;
|
||||
}
|
||||
|
||||
Sync();
|
||||
}
|
||||
|
||||
|
|
|
@ -1201,7 +1201,7 @@ void openAbout ()
|
|||
gtk_show_about_dialog(GTK_WINDOW(MainWindow),
|
||||
"program-name", "fceuX",
|
||||
"version", FCEU_VERSION_STRING,
|
||||
"copyright", "© 2011 FceuX development team",
|
||||
"copyright", "© 2012 FceuX development team",
|
||||
"license", "GPL-2; See COPYING",
|
||||
//"license-type", GTK_LICENSE_GPL_2_0,
|
||||
"website", "http://fceux.com",
|
||||
|
|
|
@ -1479,7 +1479,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
|||
BEGIN
|
||||
DEFPUSHBUTTON "Save",IDOK,7,114,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,65,114,50,14
|
||||
CONTROL " Binary Format of Input",IDC_CHECK_BINARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,7,87,10
|
||||
CONTROL " Binary format of Input",IDC_CHECK_BINARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,7,87,10
|
||||
CONTROL " Markers",IDC_CHECK_MARKERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,35,22,67,10
|
||||
CONTROL " Bookmarks",IDC_CHECK_BOOKMARKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,35,37,67,10
|
||||
CONTROL " Greenzone",IDC_CHECK_GREENZONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,35,52,67,10
|
||||
|
|
|
@ -465,9 +465,9 @@ bool PLAYBACK::JumpToFrame(int index)
|
|||
}
|
||||
// search for an earlier frame with savestate
|
||||
int i = (index > 0) ? index-1 : 0;
|
||||
for (; i > 0; i--)
|
||||
for (; i >= 0; i--)
|
||||
if (greenzone.loadTasSavestate(i)) break;
|
||||
if (i > 0)
|
||||
if (i < 0)
|
||||
StartFromZero(); // couldn't find a savestate
|
||||
// continue from the frame
|
||||
if (index != currFrameCounter)
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#define GREENZONE_CAPACITY_DEFAULT 10000
|
||||
|
||||
#define UNDO_LEVELS_MIN 1
|
||||
#define UNDO_LEVELS_MAX 999
|
||||
#define UNDO_LEVELS_DEFAULT 99
|
||||
#define UNDO_LEVELS_MAX 1000
|
||||
#define UNDO_LEVELS_DEFAULT 100
|
||||
|
||||
#define AUTOSAVE_PERIOD_MIN 0 // 0 = no autosave
|
||||
#define AUTOSAVE_PERIOD_MAX 1440 // 24 hours
|
||||
|
|
|
@ -60,7 +60,7 @@ void TASEDITOR_PROJECT::reset()
|
|||
void TASEDITOR_PROJECT::update()
|
||||
{
|
||||
// if it's time to autosave - pop Save As dialog
|
||||
if (changed && taseditor_window.TASEditor_focus && taseditor_config.autosave_period && clock() >= next_save_shedule && piano_roll.drag_mode == DRAG_MODE_NONE)
|
||||
if (changed && taseditor_window.TASEditor_focus && taseditor_config.autosave_period && !projectFile.empty() && clock() >= next_save_shedule && piano_roll.drag_mode == DRAG_MODE_NONE)
|
||||
{
|
||||
if (taseditor_config.silent_autosave)
|
||||
SaveProject();
|
||||
|
@ -69,7 +69,6 @@ void TASEDITOR_PROJECT::update()
|
|||
// in case user pressed Cancel, postpone saving to next time
|
||||
SheduleNextAutosave();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool TASEDITOR_PROJECT::save(const char* different_name, bool save_binary, bool save_markers, bool save_bookmarks, bool save_greenzone, bool save_history, bool save_piano_roll, bool save_selection)
|
||||
|
@ -148,9 +147,9 @@ bool TASEDITOR_PROJECT::save(const char* different_name, bool save_binary, bool
|
|||
selection.save(ofs, save_selection);
|
||||
delete ofs;
|
||||
playback.updateProgressbar();
|
||||
// also reset autosave period if we saved the project to its current filename
|
||||
// also set project.changed to false, unless it was SaveCompact
|
||||
if (!different_name)
|
||||
this->reset();
|
||||
reset();
|
||||
// restore cursor
|
||||
taseditor_window.must_update_mouse_cursor = true;
|
||||
return true;
|
||||
|
|
|
@ -131,7 +131,7 @@ char taseditor_help_filename[] = "\\taseditor.chm";
|
|||
// all items of the window (used for resising) and their default x,y,w,h
|
||||
// actual x,y,w,h are calculated at the beginning from screen
|
||||
Window_items_struct window_items[TASEDITOR_WINDOW_TOTAL_ITEMS] = {
|
||||
IDC_PROGRESS_BUTTON, -1, 0, 0, 0, "Click here whenever you want to abort seeking", "", false, EMUCMD_TASEDITOR_CANCEL_SEEKING, 0,
|
||||
IDC_PROGRESS_BUTTON, -1, 0, 0, 0, "Click here when you want to abort seeking", "", false, EMUCMD_TASEDITOR_CANCEL_SEEKING, 0,
|
||||
IDC_BRANCHES_BUTTON, -1, 0, 0, 0, "Click here to switch between Bookmarks List and Branches Tree", "", false, 0, 0,
|
||||
IDC_LIST1, 0, 0, -1, -1, "", "", false, 0, 0,
|
||||
IDC_PLAYBACK_BOX, -1, 0, 0, 0, "", "", false, 0, 0,
|
||||
|
@ -147,7 +147,7 @@ Window_items_struct window_items[TASEDITOR_WINDOW_TOTAL_ITEMS] = {
|
|||
TASEDITOR_FORWARD_FULL, -1, 0, 0, 0, "Send Playback to next Marker (mouse: Shift+Wheel down) (hotkey: Shift+PageDown)", "", false, 0, 0,
|
||||
IDC_PROGRESS1, -1, 0, 0, 0, "", "", false, 0, 0,
|
||||
CHECK_FOLLOW_CURSOR, -1, 0, 0, 0, "The Piano Roll will follow Playback cursor movements", "", false, 0, 0,
|
||||
CHECK_AUTORESTORE_PLAYBACK, -1, 0, 0, 0, "When you change input above Playback cursor, the cursor returns to where it was before the change", "", false, 0, 0,
|
||||
CHECK_AUTORESTORE_PLAYBACK, -1, 0, 0, 0, "Whenever you change input above Playback cursor, the cursor returns to where it was before the change (hotkey: Ctrl+Spacebar)", "", false, 0, 0,
|
||||
IDC_BOOKMARKSLIST, -1, 0, 0, 0, "Right click = set Bookmark, Left click = jump to Bookmark or load Branch", "", false, 0, 0,
|
||||
IDC_HISTORYLIST, -1, 0, 0, -1, "Click to revert the project back to that time", "", false, 0, 0,
|
||||
IDC_RADIO_ALL, -1, 0, 0, 0, "", "", false, 0, 0,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define TASEDITOR_WINDOW_TOTAL_ITEMS 43
|
||||
#define PIANOROLL_IN_WINDOWITEMS 2
|
||||
|
||||
#define TOOLTIP_TEXT_MAX_LEN 100
|
||||
#define TOOLTIP_TEXT_MAX_LEN 127
|
||||
#define TOOLTIPS_AUTOPOP_TIMEOUT 30000
|
||||
|
||||
#define PATTERNS_MENU_POS 5
|
||||
|
|
2861
src/ines.cpp
2861
src/ines.cpp
File diff suppressed because it is too large
Load Diff
|
@ -415,6 +415,7 @@ void Mapper171_Init(CartInfo *);
|
|||
void Mapper172_Init(CartInfo *);
|
||||
void Mapper173_Init(CartInfo *);
|
||||
void Mapper175_Init(CartInfo *);
|
||||
void Mapper176_Init(CartInfo *);
|
||||
void Mapper177_Init(CartInfo *);
|
||||
void Mapper178_Init(CartInfo *);
|
||||
void Mapper180_Init(CartInfo *);
|
||||
|
|
Loading…
Reference in New Issue