mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
- Cleaned up game names (primary sets no longer have revision labels in title).
- Added volume controls to UI. - Renamed "Sega Rally Controls" to "Sega Rally/Dirt Devils Controls" (even though Dirt Devils has no hand brake). - Hooked up gear shifting and view change for Dirt Devils. - Removed debug printf()'s from DSB.cpp. - Removed debug printf() from Real3D.cpp. - Disabled assertions in SCSPDSP.cpp. - Converted all error messages in Amp library to Supermodel format.
This commit is contained in:
parent
4040b7eeee
commit
abd86a5624
Src
|
@ -1,4 +1,3 @@
|
||||||
//TODO: clean up game titles (for example: Star Wars is incorrectly labeled rev.A)
|
|
||||||
/**
|
/**
|
||||||
** Supermodel
|
** Supermodel
|
||||||
** A Sega Model 3 Arcade Emulator.
|
** A Sega Model 3 Arcade Emulator.
|
||||||
|
@ -106,7 +105,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Daytona USA 2 (Revision A)
|
// Daytona USA 2 (Revision A)
|
||||||
{
|
{
|
||||||
"daytona2",
|
"daytona2",
|
||||||
"Daytona USA 2: Battle on the Edge (Revision A)",
|
"Daytona USA 2: Battle on the Edge",
|
||||||
"Sega",
|
"Sega",
|
||||||
1998,
|
1998,
|
||||||
0x21,
|
0x21,
|
||||||
|
@ -272,7 +271,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Dirt Devils (Revision A)
|
// Dirt Devils (Revision A)
|
||||||
{
|
{
|
||||||
"dirtdvls",
|
"dirtdvls",
|
||||||
"Dirt Devils (Revision A)",
|
"Dirt Devils",
|
||||||
"Sega",
|
"Sega",
|
||||||
1998,
|
1998,
|
||||||
0x21,
|
0x21,
|
||||||
|
@ -280,7 +279,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
TRUE, // 32 MB of banked CROM (Mirror)
|
TRUE, // 32 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0xC00000, // 12 MB of sample ROMs
|
0xC00000, // 12 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_RALLY,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -334,7 +333,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Dirt Devils (Alt)(Revision A)
|
// Dirt Devils (Alt)(Revision A)
|
||||||
{
|
{
|
||||||
"dirtdvlsa",
|
"dirtdvlsa",
|
||||||
"Dirt Devils (Alt)(Revision A)",
|
"Dirt Devils (Alt.)",
|
||||||
"Sega",
|
"Sega",
|
||||||
1998,
|
1998,
|
||||||
0x21,
|
0x21,
|
||||||
|
@ -342,7 +341,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
TRUE, // 32 MB of banked CROM (Mirror)
|
TRUE, // 32 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0xC00000, // 12 MB of sample ROMs
|
0xC00000, // 12 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -534,7 +533,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Fighting Vipers 2 (Revision A)
|
// Fighting Vipers 2 (Revision A)
|
||||||
{
|
{
|
||||||
"fvipers2",
|
"fvipers2",
|
||||||
"Fighting Vipers 2 (Revision A)",
|
"Fighting Vipers 2",
|
||||||
"Sega",
|
"Sega",
|
||||||
1998,
|
1998,
|
||||||
0x20,
|
0x20,
|
||||||
|
@ -676,7 +675,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Harley-Davidson & L.A. Riders (Revision A)
|
// Harley-Davidson & L.A. Riders (Revision A)
|
||||||
{
|
{
|
||||||
"harley",
|
"harley",
|
||||||
"Harley-Davidson & L.A. Riders (Revision A)",
|
"Harley-Davidson & L.A. Riders",
|
||||||
"Sega",
|
"Sega",
|
||||||
1997,
|
1997,
|
||||||
0x20,
|
0x20,
|
||||||
|
@ -1374,7 +1373,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Scud Race Plus (Revision A)
|
// Scud Race Plus (Revision A)
|
||||||
{
|
{
|
||||||
"scudp",
|
"scudp",
|
||||||
"Scud Race Plus (Revision A)",
|
"Scud Race Plus",
|
||||||
"Sega",
|
"Sega",
|
||||||
1997,
|
1997,
|
||||||
0x15,
|
0x15,
|
||||||
|
@ -1608,7 +1607,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Spikeout (Revision C)
|
// Spikeout (Revision C)
|
||||||
{
|
{
|
||||||
"spikeout",
|
"spikeout",
|
||||||
"Spikeout (Revision C)",
|
"Spikeout",
|
||||||
"Sega",
|
"Sega",
|
||||||
1998,
|
1998,
|
||||||
0x21,
|
0x21,
|
||||||
|
@ -1977,7 +1976,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Virtua Fighter 3 (Revision C)
|
// Virtua Fighter 3 (Revision C)
|
||||||
{
|
{
|
||||||
"vf3",
|
"vf3",
|
||||||
"Virtua Fighter 3 (Revision C)",
|
"Virtua Fighter 3",
|
||||||
"Sega",
|
"Sega",
|
||||||
1996,
|
1996,
|
||||||
0x10,
|
0x10,
|
||||||
|
@ -2196,7 +2195,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Virtual On: Oratorio Tangram (Revision B)
|
// Virtual On: Oratorio Tangram (Revision B)
|
||||||
{
|
{
|
||||||
"von2",
|
"von2",
|
||||||
"Virtual On: Oratorio Tangram (Revision B)",
|
"Virtual On: Oratorio Tangram",
|
||||||
"Sega",
|
"Sega",
|
||||||
1998,
|
1998,
|
||||||
0x20,
|
0x20,
|
||||||
|
@ -2268,10 +2267,10 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Virtual On: Oratorio Tangram (Ver 5.4g)
|
// Virtual On: Oratorio Tangram (Version 5.4g)
|
||||||
{
|
{
|
||||||
"von254g",
|
"von254g",
|
||||||
"Virtual On: Oratorio Tangram (Ver 5.4g)",
|
"Virtual On: Oratorio Tangram (Version 5.4g)",
|
||||||
"Sega",
|
"Sega",
|
||||||
1998,
|
1998,
|
||||||
0x20,
|
0x20,
|
||||||
|
@ -2857,7 +2856,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
// Virtua Striker 2 '99.1 (Revision B)
|
// Virtua Striker 2 '99.1 (Revision B)
|
||||||
{
|
{
|
||||||
"vs2v991",
|
"vs2v991",
|
||||||
"Virtua Striker 2 '99.1 (Revision B)",
|
"Virtua Striker 2 '99.1",
|
||||||
"Sega",
|
"Sega",
|
||||||
1999,
|
1999,
|
||||||
0x21,
|
0x21,
|
||||||
|
|
|
@ -65,7 +65,7 @@ const char* CInput::GetInputGroup()
|
||||||
case GAME_INPUT_VEHICLE: return "Racing Game Steering Controls";
|
case GAME_INPUT_VEHICLE: return "Racing Game Steering Controls";
|
||||||
case GAME_INPUT_SHIFT4: return "Racing Game Gear Shift";
|
case GAME_INPUT_SHIFT4: return "Racing Game Gear Shift";
|
||||||
case GAME_INPUT_VR: return "Racing Game VR View Buttons";
|
case GAME_INPUT_VR: return "Racing Game VR View Buttons";
|
||||||
case GAME_INPUT_RALLY: return "Sega Rally Buttons";
|
case GAME_INPUT_RALLY: return "Sega Rally/Dirt Devils Buttons";
|
||||||
case GAME_INPUT_TWIN_JOYSTICKS: return "Virtual On Controls";
|
case GAME_INPUT_TWIN_JOYSTICKS: return "Virtual On Controls";
|
||||||
case GAME_INPUT_ANALOG_JOYSTICK: return "Analog Joystick";
|
case GAME_INPUT_ANALOG_JOYSTICK: return "Analog Joystick";
|
||||||
case GAME_INPUT_GUN1: // Fall through to below
|
case GAME_INPUT_GUN1: // Fall through to below
|
||||||
|
|
|
@ -15,7 +15,11 @@ CInputs::CInputs(CInputSystem *system) : m_system(system)
|
||||||
uiSaveState = AddSwitchInput("UISaveState", "Save State", GAME_INPUT_UI, "KEY_F5");
|
uiSaveState = AddSwitchInput("UISaveState", "Save State", GAME_INPUT_UI, "KEY_F5");
|
||||||
uiChangeSlot = AddSwitchInput("UIChangeSlot", "Change Save Slot", GAME_INPUT_UI, "KEY_F6");
|
uiChangeSlot = AddSwitchInput("UIChangeSlot", "Change Save Slot", GAME_INPUT_UI, "KEY_F6");
|
||||||
uiLoadState = AddSwitchInput("UILoadState", "Load State", GAME_INPUT_UI, "KEY_F7");
|
uiLoadState = AddSwitchInput("UILoadState", "Load State", GAME_INPUT_UI, "KEY_F7");
|
||||||
uiDumpInpState = AddSwitchInput("UIDumpInputState", "Dump Input State", GAME_INPUT_UI, "KEY_F8");
|
uiMusicVolUp = AddSwitchInput("UIMusicVolUp", "Increase Music Volume", GAME_INPUT_UI, "KEY_F10");
|
||||||
|
uiMusicVolDown = AddSwitchInput("UIMusicVolDown", "Decrease Music Volume", GAME_INPUT_UI, "KEY_F9");
|
||||||
|
uiSoundVolUp = AddSwitchInput("UISoundVolUp", "Increase Sound Volume", GAME_INPUT_UI, "KEY_F12");
|
||||||
|
uiSoundVolDown = AddSwitchInput("UISoundVolDown", "Decrease Sound Volume", GAME_INPUT_UI, "KEY_F11");
|
||||||
|
uiDumpInpState = AddSwitchInput("UIDumpInputState", "Dump Input State", GAME_INPUT_UI, "NONE"); // disabled for release
|
||||||
uiClearNVRAM = AddSwitchInput("UIClearNVRAM", "Clear NVRAM", GAME_INPUT_UI, "KEY_ALT+KEY_N");
|
uiClearNVRAM = AddSwitchInput("UIClearNVRAM", "Clear NVRAM", GAME_INPUT_UI, "KEY_ALT+KEY_N");
|
||||||
uiSelectCrosshairs = AddSwitchInput("UISelectCrosshairs", "Select Crosshairs", GAME_INPUT_UI, "KEY_ALT+KEY_I");
|
uiSelectCrosshairs = AddSwitchInput("UISelectCrosshairs", "Select Crosshairs", GAME_INPUT_UI, "KEY_ALT+KEY_I");
|
||||||
uiToggleFrLimit = AddSwitchInput("UIToggleFrameLimit", "Toggle Frame Limiting", GAME_INPUT_UI, "KEY_ALT+KEY_T");
|
uiToggleFrLimit = AddSwitchInput("UIToggleFrameLimit", "Toggle Frame Limiting", GAME_INPUT_UI, "KEY_ALT+KEY_T");
|
||||||
|
|
|
@ -70,6 +70,10 @@ public:
|
||||||
CSwitchInput *uiSaveState;
|
CSwitchInput *uiSaveState;
|
||||||
CSwitchInput *uiChangeSlot;
|
CSwitchInput *uiChangeSlot;
|
||||||
CSwitchInput *uiLoadState;
|
CSwitchInput *uiLoadState;
|
||||||
|
CSwitchInput *uiMusicVolUp;
|
||||||
|
CSwitchInput *uiMusicVolDown;
|
||||||
|
CSwitchInput *uiSoundVolUp;
|
||||||
|
CSwitchInput *uiSoundVolDown;
|
||||||
CSwitchInput *uiDumpInpState;
|
CSwitchInput *uiDumpInpState;
|
||||||
CSwitchInput *uiClearNVRAM;
|
CSwitchInput *uiClearNVRAM;
|
||||||
CSwitchInput *uiSelectCrosshairs;
|
CSwitchInput *uiSelectCrosshairs;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
//TODO: amp can print error messages -- change them to Supermodel error messages
|
|
||||||
/**
|
/**
|
||||||
** Supermodel
|
** Supermodel
|
||||||
** A Sega Model 3 Arcade Emulator.
|
** A Sega Model 3 Arcade Emulator.
|
||||||
|
@ -679,7 +678,7 @@ static const char *stateName[] =
|
||||||
|
|
||||||
void CDSB2::WriteMPEGFIFO(UINT8 byte)
|
void CDSB2::WriteMPEGFIFO(UINT8 byte)
|
||||||
{
|
{
|
||||||
printf("fifo: %x (state %s)\n", byte, stateName[mpegState]);
|
//printf("fifo: %x (state %s)\n", byte, stateName[mpegState]);
|
||||||
switch (mpegState)
|
switch (mpegState)
|
||||||
{
|
{
|
||||||
case ST_IDLE:
|
case ST_IDLE:
|
||||||
|
@ -695,7 +694,7 @@ void CDSB2::WriteMPEGFIFO(UINT8 byte)
|
||||||
usingMPEGStart = mpegStart;
|
usingMPEGStart = mpegStart;
|
||||||
usingMPEGEnd = mpegEnd;
|
usingMPEGEnd = mpegEnd;
|
||||||
MPEG_PlayMemory((const char *) &mpegROM[mpegStart], mpegEnd-mpegStart);
|
MPEG_PlayMemory((const char *) &mpegROM[mpegStart], mpegEnd-mpegStart);
|
||||||
printf("playing %X\n", mpegStart);
|
//printf("playing %X\n", mpegStart);
|
||||||
mpegState = ST_IDLE;
|
mpegState = ST_IDLE;
|
||||||
playing = 1;
|
playing = 1;
|
||||||
}
|
}
|
||||||
|
@ -739,7 +738,7 @@ void CDSB2::WriteMPEGFIFO(UINT8 byte)
|
||||||
|
|
||||||
if (playing)
|
if (playing)
|
||||||
{
|
{
|
||||||
printf("Setting loop point to %x\n", mpegStart);
|
//printf("Setting loop point to %x\n", mpegStart);
|
||||||
usingLoopStart = mpegStart;
|
usingLoopStart = mpegStart;
|
||||||
usingLoopEnd = mpegEnd-mpegStart;
|
usingLoopEnd = mpegEnd-mpegStart;
|
||||||
MPEG_SetLoop((const char *) &mpegROM[usingLoopStart], usingLoopEnd);
|
MPEG_SetLoop((const char *) &mpegROM[usingLoopStart], usingLoopEnd);
|
||||||
|
@ -763,17 +762,19 @@ void CDSB2::WriteMPEGFIFO(UINT8 byte)
|
||||||
//printf("mpegEnd=%x\n", mpegEnd);
|
//printf("mpegEnd=%x\n", mpegEnd);
|
||||||
|
|
||||||
// default to full stereo
|
// default to full stereo
|
||||||
// mixer_set_stereo_volume(0, 255, 255);
|
//mixer_set_stereo_volume(0, 255, 255);
|
||||||
// mixer_set_stereo_pan(0, MIXER_PAN_RIGHT, MIXER_PAN_LEFT);
|
//mixer_set_stereo_pan(0, MIXER_PAN_RIGHT, MIXER_PAN_LEFT);
|
||||||
mpegState = ST_IDLE;
|
mpegState = ST_IDLE;
|
||||||
break;
|
break;
|
||||||
// case ST_GOTA0:
|
/*
|
||||||
|
case ST_GOTA0:
|
||||||
// ch 0 mono
|
// ch 0 mono
|
||||||
// mixer_set_stereo_volume(0, 0, 255);
|
mixer_set_stereo_volume(0, 0, 255);
|
||||||
// printf("ch 0 mono\n");
|
printf("ch 0 mono\n");
|
||||||
// mixer_set_stereo_pan(0, MIXER_PAN_CENTER, MIXER_PAN_CENTER);
|
mixer_set_stereo_pan(0, MIXER_PAN_CENTER, MIXER_PAN_CENTER);
|
||||||
mpegState = ST_IDLE;
|
mpegState = ST_IDLE;
|
||||||
// break;
|
break;
|
||||||
|
*/
|
||||||
case ST_GOTA4: // dayto2pe plays advertise tune from this state by writing 0x75
|
case ST_GOTA4: // dayto2pe plays advertise tune from this state by writing 0x75
|
||||||
mpegState = ST_IDLE;
|
mpegState = ST_IDLE;
|
||||||
if (byte == 0x75)
|
if (byte == 0x75)
|
||||||
|
@ -783,7 +784,7 @@ void CDSB2::WriteMPEGFIFO(UINT8 byte)
|
||||||
usingMPEGStart = mpegStart;
|
usingMPEGStart = mpegStart;
|
||||||
usingMPEGEnd = mpegEnd;
|
usingMPEGEnd = mpegEnd;
|
||||||
MPEG_PlayMemory((const char *) &mpegROM[mpegStart], mpegEnd-mpegStart);
|
MPEG_PlayMemory((const char *) &mpegROM[mpegStart], mpegEnd-mpegStart);
|
||||||
printf("playing %X (from st_gota4)\n", mpegStart);
|
//printf("playing %X (from st_gota4)\n", mpegStart);
|
||||||
playing = 1;
|
playing = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -792,9 +793,9 @@ void CDSB2::WriteMPEGFIFO(UINT8 byte)
|
||||||
break;
|
break;
|
||||||
case ST_GOTB1:
|
case ST_GOTB1:
|
||||||
// ch 1 mono
|
// ch 1 mono
|
||||||
// printf("ch 1 mono\n");
|
//printf("ch 1 mono\n");
|
||||||
// mixer_set_stereo_volume(0, 255, 0);
|
//mixer_set_stereo_volume(0, 255, 0);
|
||||||
// mixer_set_stereo_pan(0, MIXER_PAN_CENTER, MIXER_PAN_CENTER);
|
//mixer_set_stereo_pan(0, MIXER_PAN_CENTER, MIXER_PAN_CENTER);
|
||||||
mpegState = ST_IDLE;
|
mpegState = ST_IDLE;
|
||||||
break;
|
break;
|
||||||
case ST_GOTB4:
|
case ST_GOTB4:
|
||||||
|
@ -862,7 +863,7 @@ UINT8 CDSB2::Read8(UINT32 addr)
|
||||||
return ram[addr^1];
|
return ram[addr^1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("R8 @ %x\n", addr);
|
//printf("R8 @ %x\n", addr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,7 +879,7 @@ UINT16 CDSB2::Read16(UINT32 addr)
|
||||||
return *(UINT16 *) &ram[addr];
|
return *(UINT16 *) &ram[addr];
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("R16 @ %x\n", addr);
|
//printf("R16 @ %x\n", addr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -899,7 +900,7 @@ UINT32 CDSB2::Read32(UINT32 addr)
|
||||||
lo = *(UINT16 *) &ram[addr+2];
|
lo = *(UINT16 *) &ram[addr+2];
|
||||||
return (hi<<16)|lo;
|
return (hi<<16)|lo;
|
||||||
}
|
}
|
||||||
// printf("R32 @ %x\n", addr);
|
//printf("R32 @ %x\n", addr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -920,7 +921,7 @@ void CDSB2::Write8(UINT32 addr, UINT8 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("W8: %x @ %x (PC=%x)\n", data, addr, m68k_get_reg(NULL, M68K_REG_PC));
|
//printf("W8: %x @ %x (PC=%x)\n", data, addr, m68k_get_reg(NULL, M68K_REG_PC));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDSB2::Write16(UINT32 addr, UINT16 data)
|
void CDSB2::Write16(UINT32 addr, UINT16 data)
|
||||||
|
@ -1109,9 +1110,9 @@ void CDSB2::LoadState(CBlockFile *StateFile)
|
||||||
MPEG_StopPlaying();
|
MPEG_StopPlaying();
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
printf("mpegStart=%X, mpegEnd=%X\n", mpegStart, mpegEnd);
|
//printf("mpegStart=%X, mpegEnd=%X\n", mpegStart, mpegEnd);
|
||||||
printf("usingMPEGStart=%X, usingMPEGEnd=%X\n", usingMPEGStart, usingMPEGEnd);
|
//printf("usingMPEGStart=%X, usingMPEGEnd=%X\n", usingMPEGStart, usingMPEGEnd);
|
||||||
printf("usingLoopStart=%X, usingLoopEnd=%X\n", usingLoopStart, usingLoopEnd);
|
//printf("usingLoopStart=%X, usingLoopEnd=%X\n", usingLoopStart, usingLoopEnd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -647,7 +647,8 @@ void CReal3D::UploadTexture(UINT32 header, UINT16 *texData)
|
||||||
case 0x80: // MAME thinks these might be a gamma table
|
case 0x80: // MAME thinks these might be a gamma table
|
||||||
//break;
|
//break;
|
||||||
default: // unknown
|
default: // unknown
|
||||||
printf("unknown texture format %02X\n", header>>24);
|
DebugLog("Unknown texture format %02X\n", header>>24);
|
||||||
|
//printf("unknown texture format %02X\n", header>>24);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,10 @@
|
||||||
// - remove UI dump input state
|
// - remove UI dump input state
|
||||||
// - VBL timing?
|
// - VBL timing?
|
||||||
// - Controls for Dirt Devils, and other recent games (is bass working?)
|
// - Controls for Dirt Devils, and other recent games (is bass working?)
|
||||||
// - Stereo reverse option (see Srally2 sound test menu)
|
|
||||||
// - Comment source code, clean up
|
// - Comment source code, clean up
|
||||||
// - BOOL -> bool, TRUE/FALSE -> true/false
|
// - BOOL -> bool, TRUE/FALSE -> true/false
|
||||||
// - Add option for building with /MD in MSVC Makefile
|
// - Add option for building with /MD in MSVC Makefile
|
||||||
// - Remove SUPERMODEL_SOUND
|
// - Remove SUPERMODEL_SOUND
|
||||||
// - EmulateSCSP -> EmulateSound ?
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** Supermodel
|
** Supermodel
|
||||||
|
@ -824,6 +822,58 @@ int Supermodel(const char *zipFile, CInputs *Inputs, CINIFile *CmdLine)
|
||||||
Debugger->Reset();
|
Debugger->Reset();
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
#endif // SUPERMODEL_DEBUGGER
|
||||||
}
|
}
|
||||||
|
else if (Inputs->uiMusicVolUp->Pressed())
|
||||||
|
{
|
||||||
|
// Increase music volume by 10%
|
||||||
|
int vol = (int) g_Config.GetMusicVolume() + 10;
|
||||||
|
if (vol > 200)
|
||||||
|
vol = 200;
|
||||||
|
g_Config.SetMusicVolume(vol);
|
||||||
|
printf("Music volume: %d%%", vol);
|
||||||
|
if (200 == vol)
|
||||||
|
puts(" (maximum)");
|
||||||
|
else
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
else if (Inputs->uiMusicVolDown->Pressed())
|
||||||
|
{
|
||||||
|
// Decrease music volume by 10%
|
||||||
|
int vol = (int) g_Config.GetMusicVolume() - 10;
|
||||||
|
if (vol < 0)
|
||||||
|
vol = 0;
|
||||||
|
g_Config.SetMusicVolume(vol);
|
||||||
|
printf("Music volume: %d%%", vol);
|
||||||
|
if (0 == vol)
|
||||||
|
puts(" (muted)");
|
||||||
|
else
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
else if (Inputs->uiSoundVolUp->Pressed())
|
||||||
|
{
|
||||||
|
// Increase sound volume by 10%
|
||||||
|
int vol = (int) g_Config.GetSoundVolume() + 10;
|
||||||
|
if (vol > 200)
|
||||||
|
vol = 200;
|
||||||
|
g_Config.SetSoundVolume(vol);
|
||||||
|
printf("Sound volume: %d%%", vol);
|
||||||
|
if (200 == vol)
|
||||||
|
puts(" (maximum)");
|
||||||
|
else
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
else if (Inputs->uiSoundVolDown->Pressed())
|
||||||
|
{
|
||||||
|
// Decrease sound volume by 10%
|
||||||
|
int vol = (int) g_Config.GetSoundVolume() - 10;
|
||||||
|
if (vol < 0)
|
||||||
|
vol = 0;
|
||||||
|
g_Config.SetSoundVolume(vol);
|
||||||
|
printf("Sound volume: %d%%", vol);
|
||||||
|
if (0 == vol)
|
||||||
|
puts(" (muted)");
|
||||||
|
else
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
else if (Inputs->uiDumpInpState->Pressed())
|
else if (Inputs->uiDumpInpState->Pressed())
|
||||||
{
|
{
|
||||||
// Dump input states
|
// Dump input states
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "Types.h"
|
#include "Supermodel.h"
|
||||||
#include "MPEG.h"
|
#include "MPEG.h"
|
||||||
|
|
||||||
//#include "m1snd.h"
|
//#include "m1snd.h"
|
||||||
|
@ -89,12 +89,12 @@ int decodeMPEGOneFrame(struct AUDIO_HEADER *header)
|
||||||
|
|
||||||
if (header->layer==1) {
|
if (header->layer==1) {
|
||||||
if (layer3_frame(header,cnt)) {
|
if (layer3_frame(header,cnt)) {
|
||||||
warn(" error. blip.\n");
|
ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (header->layer==2)
|
} else if (header->layer==2)
|
||||||
if (layer2_frame(header,cnt)) {
|
if (layer2_frame(header,cnt)) {
|
||||||
warn(" error. blip.\n");
|
ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,19 +121,19 @@ int g,snd_eof=0;
|
||||||
|
|
||||||
//printf("%d Hz, layer %d\n", t_sampling_frequency[header.ID][header.sampling_frequency], header.layer);
|
//printf("%d Hz, layer %d\n", t_sampling_frequency[header.ID][header.sampling_frequency], header.layer);
|
||||||
|
|
||||||
if (setup_audio(&header)!=0) {
|
if (setup_audio(&header)!=0) { // will never fail (setup_audio() does nothing)
|
||||||
warn("Cannot set up audio. Exiting\n");
|
ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (header.layer==1) {
|
if (header.layer==1) {
|
||||||
if (layer3_frame(&header,cnt)) {
|
if (layer3_frame(&header,cnt)) {
|
||||||
warn(" error. blip.\n");
|
ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (header.layer==2)
|
} else if (header.layer==2)
|
||||||
if (layer2_frame(&header,cnt)) {
|
if (layer2_frame(&header,cnt)) {
|
||||||
warn(" error. blip.\n");
|
ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,17 +173,20 @@ void initialise_globals(void)
|
||||||
void report_header_error(int err)
|
void report_header_error(int err)
|
||||||
{
|
{
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case GETHDR_ERR: die("error reading mpeg bitstream. exiting.\n");
|
case GETHDR_ERR:
|
||||||
|
ErrorLog("Internal error in MPEG decoder: unable to read bit stream.");
|
||||||
break;
|
break;
|
||||||
case GETHDR_NS : warn("this is a file in MPEG 2.5 format, which is not defined\n");
|
case GETHDR_NS :
|
||||||
warn("by ISO/MPEG. It is \"a special Fraunhofer format\".\n");
|
ErrorLog("Internal error in MPEG decoder: invalid MPEG format encountered.");
|
||||||
warn("amp does not support this format. sorry.\n");
|
|
||||||
break;
|
break;
|
||||||
case GETHDR_FL1: warn("ISO/MPEG layer 1 is not supported by amp.\n");
|
case GETHDR_FL1:
|
||||||
|
ErrorLog("Internal error in MPEG decoder: unsupported MPEG format encountered.");
|
||||||
break;
|
break;
|
||||||
case GETHDR_FF : warn("free format bitstreams are not supported. sorry.\n");
|
case GETHDR_FF :
|
||||||
|
ErrorLog("Internal error in MPEG decoder: unsupported bit stream encountered.");
|
||||||
break;
|
break;
|
||||||
case GETHDR_SYN: warn("oops, we're out of sync.\n");
|
case GETHDR_SYN:
|
||||||
|
ErrorLog("Internal error in MPEG decoder: out of sync!");
|
||||||
break;
|
break;
|
||||||
case GETHDR_EOF:
|
case GETHDR_EOF:
|
||||||
default: ; /* some stupid compilers need the semicolon */
|
default: ; /* some stupid compilers need the semicolon */
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
#define HUFFMAN
|
#define HUFFMAN
|
||||||
#include "huffman.h"
|
#include "huffman.h"
|
||||||
|
|
||||||
|
#include "Supermodel.h"
|
||||||
|
|
||||||
static inline unsigned int viewbits(int n)
|
static inline unsigned int viewbits(int n)
|
||||||
{
|
{
|
||||||
unsigned int pos,ret_value;
|
unsigned int pos,ret_value;
|
||||||
|
@ -65,7 +67,8 @@ int len;
|
||||||
* have another table with huffman tables lengths, and
|
* have another table with huffman tables lengths, and
|
||||||
* it would be a mess. just in case, scream&shout.
|
* it would be a mess. just in case, scream&shout.
|
||||||
*/
|
*/
|
||||||
printf(" h_cue clobbered. this is a bug. blip.\n");
|
|
||||||
|
ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__); // h_cue clobbered
|
||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
chunk <<= 32-19;
|
chunk <<= 32-19;
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#define LAYER2
|
#define LAYER2
|
||||||
#include "layer2.h"
|
#include "layer2.h"
|
||||||
|
|
||||||
|
#include "Supermodel.h"
|
||||||
|
|
||||||
int layer2_frame(struct AUDIO_HEADER *header,int cnt)
|
int layer2_frame(struct AUDIO_HEADER *header,int cnt)
|
||||||
{
|
{
|
||||||
int i,s,sb,ch,gr,bitrate,bound=0;
|
int i,s,sb,ch,gr,bitrate,bound=0;
|
||||||
|
@ -80,7 +82,7 @@ int hsize,fs,mean_frame_size;
|
||||||
nbal=(char (*)[])&t_nbal2;
|
nbal=(char (*)[])&t_nbal2;
|
||||||
sblimit=8;
|
sblimit=8;
|
||||||
break;
|
break;
|
||||||
default : printf(" bit alloc info no gud ");
|
default : ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1 : switch (bitrate) /* 1 = 48 kHz */
|
case 1 : switch (bitrate) /* 1 = 48 kHz */
|
||||||
|
@ -101,7 +103,7 @@ int hsize,fs,mean_frame_size;
|
||||||
nbal=(char (*)[])&t_nbal2;
|
nbal=(char (*)[])&t_nbal2;
|
||||||
sblimit=8;
|
sblimit=8;
|
||||||
break;
|
break;
|
||||||
default : printf(" bit alloc info no gud ");
|
default : ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2 : switch (bitrate) /* 2 = 32 kHz */
|
case 2 : switch (bitrate) /* 2 = 32 kHz */
|
||||||
|
@ -125,10 +127,10 @@ int hsize,fs,mean_frame_size;
|
||||||
nbal=(char (*)[])&t_nbal3;
|
nbal=(char (*)[])&t_nbal3;
|
||||||
sblimit=12;
|
sblimit=12;
|
||||||
break;
|
break;
|
||||||
default : printf("bit alloc info not ok\n");
|
default : ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default : printf("sampling freq. not ok/n");
|
default : ErrorLog("Internal error in MPEG decoder (%s:%d).", __FILE__, __LINE__); // sampling frequency no good
|
||||||
} else {
|
} else {
|
||||||
bit_alloc_index=(char (*)[][16])&t_allocMPG2;
|
bit_alloc_index=(char (*)[][16])&t_allocMPG2;
|
||||||
nbal=(char (*)[])&t_nbalMPG2;
|
nbal=(char (*)[])&t_nbalMPG2;
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#define MISC2
|
#define MISC2
|
||||||
#include "misc2.h"
|
#include "misc2.h"
|
||||||
|
|
||||||
|
#include "Supermodel.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* fras == Formula for Requantization and All Scaling **************************
|
* fras == Formula for Requantization and All Scaling **************************
|
||||||
*/
|
*/
|
||||||
|
@ -623,7 +625,7 @@ float a[2];
|
||||||
*/
|
*/
|
||||||
if (info->window_switching_flag[gr][0] && info->block_type[gr][0]==2)
|
if (info->window_switching_flag[gr][0] && info->block_type[gr][0]==2)
|
||||||
if (info->mixed_block_flag[gr][0]) {
|
if (info->mixed_block_flag[gr][0]) {
|
||||||
die("mixed block? hmmmm...., downmix for mixed blocks is not yet implemented\n");
|
ErrorLog("Internal error in MPEG decoder: mixed blocks encountered.");
|
||||||
} else {
|
} else {
|
||||||
int window,window_len;
|
int window,window_len;
|
||||||
int isbound[3];
|
int isbound[3];
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
/*
|
||||||
|
* None of these functions should ever be called in Supermodel.
|
||||||
|
*/
|
||||||
|
|
||||||
/* this file is a part of amp software
|
/* this file is a part of amp software
|
||||||
|
|
||||||
util.c: created by Andrew Richards
|
util.c: created by Andrew Richards
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
#include "SCSPDSP.h"
|
#include "SCSPDSP.h"
|
||||||
#include <assert.h>
|
//#include <assert.h>
|
||||||
|
#define assert(x) ; // disable assert() for releases
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
Loading…
Reference in a new issue