Fix some lintian warnings. Patch by sergio-br2.

This commit is contained in:
skidau 2015-05-29 22:11:38 +00:00
parent 5a6ed061a4
commit 56a42ec50f
9 changed files with 37 additions and 35 deletions

View File

@ -97,7 +97,7 @@ Less important:
- Merge HQ2x/LQ2x C code into code for HQ3x/4x - Merge HQ2x/LQ2x C code into code for HQ3x/4x
- Apply pixel filter to sprites and BG seperately for better image quality - Apply pixel filter to sprites and BG separately for better image quality
- Add CGB Bios support - Add CGB Bios support
@ -175,4 +175,4 @@ shuffle2:
- various build fixes - various build fixes
Squarepusher Squarepusher
- Libretro merge - Libretro merge

View File

@ -9,13 +9,13 @@ Bit Value
3 - THUMB 3 - THUMB
4 - Always on Write 4 - Always on Write
5 - Always on Read 5 - Always on Read
6 - Always on ARM 6 - Always on ARM
7 - Always on THUMB 7 - Always on THUMB
Each flag is independant, and can be used as such, as well as together. Each flag is independent, and can be used as such, as well as together.
You can define a break on access (0xf), break on IO (0x3), break on You can define a break on access (0xf), break on IO (0x3), break on
execution(0xc) or any other combination you need. 0xf0 will always break on execution(0xc) or any other combination you need. 0xf0 will always break on
any passage through the address any passage through the address
This structure is accompanied by two other structures for the accesses. This structure is accompanied by two other structures for the accesses.
One of them is the Conditional structure. It's available for all types. One of them is the Conditional structure. It's available for all types.
@ -53,13 +53,13 @@ Instructions that accept this kind of implementation will follow this pattern
if <EXP_addr> <addr_type><op><val_type> <EXP_val> [<;>OR<||>OR<&&> [repeat] if <EXP_addr> <addr_type><op><val_type> <EXP_val> [<;>OR<||>OR<&&> [repeat]
if indicates that the following there is a condition. no If counts as always break if indicates that the following there is a condition. no If counts as always break
<EXP_addr> is the first value expression, that unlike what the name implies, may be <EXP_addr> is the first value expression, that unlike what the name implies, may be
anything. anything.
<op> is one of the comparation Operands. Full list bellow <op> is one of the comparation Operands. Full list bellow
<EXP_val> is the value to compare to. <EXP_val> is the value to compare to.
Following can be a ||(or), that adds a second, independant break condition, or Following can be a ||(or), that adds a second, independent break condition, or
a &&(and), that specifies that the next condition is a conjoined requisite to the break. a &&(and), that specifies that the next condition is a conjoined requisite to the break.
EX: [0x03005000] == 0x77777777 && 0x50 == [0x03005000] EX: [0x03005000] == 0x77777777 && 0x50 == [0x03005000]
Would be impossible, but tested anyway, and make it never break due to this condition. Would be impossible, but tested anyway, and make it never break due to this condition.
[0x03005000] == 0x77777777 || 0x50 == [0x03005000] [0x03005000] == 0x77777777 || 0x50 == [0x03005000]
Would make it break when the contents of 0x03005000 were either 0x77777777 or 0x50 Would make it break when the contents of 0x03005000 were either 0x77777777 or 0x50

View File

@ -2472,7 +2472,7 @@ void debuggerUsage(char *cmd)
monprintf("cond is the condition to be evaluated.\n"); monprintf("cond is the condition to be evaluated.\n");
monprintf("If && or || are not present, the chain of evaluation stops.\n"); monprintf("If && or || are not present, the chain of evaluation stops.\n");
monprintf("&& states the next condition must happen with the previous one, or the break\nfails.\n"); monprintf("&& states the next condition must happen with the previous one, or the break\nfails.\n");
monprintf("|| states the next condition is independant from the last one, and break\nseperately.\n\n"); monprintf("|| states the next condition is independent from the last one, and break\nseparately.\n\n");
monprintf("Type can be:\n"); monprintf("Type can be:\n");
monprintf(" [u8, b, byte],[u16, h, hword, halfword],[u32,w, word]\n"); monprintf(" [u8, b, byte],[u16, h, hword, halfword],[u32,w, word]\n");
monprintf(" [s8, sb, sbyte],[s16, sh, shword, short, shalfword],[s32, int, sw, word]\n"); monprintf(" [s8, sb, sbyte],[s16, sh, shword, short, shalfword],[s32, int, sw, word]\n");

View File

@ -1,10 +1,11 @@
[Desktop Entry] [Desktop Entry]
Version=1.0 Version=1.0
Type=Application Type=Application
Name=VBA-M Name=VBA-M (GTK+ frontend)
GenericName=Game Boy Advance Emulator GenericName=Game Boy Advance Emulator
Comment=Nintendo Game Boy Advance Emulator Comment=Nintendo Game Boy Advance Emulator
Exec=gvbam %f Exec=gvbam %f
Icon=vbam Icon=vbam
Categories=Game;Emulator;GTK; Categories=Game;Emulator;GTK;
Keywords=emulator;Nintendo;gameboy;Game Boy;Game Boy Color;Game Boy Advance;
MimeType=application/x-gameboy-rom;application/x-gameboy-advance-rom;application/x-dmg-rom;application/x-agb-rom;application/x-gb-rom;application/x-gba-rom; MimeType=application/x-gameboy-rom;application/x-gameboy-advance-rom;application/x-dmg-rom;application/x-agb-rom;application/x-gb-rom;application/x-gba-rom;

View File

@ -577,16 +577,16 @@ bool Window::bOnEmuSaveStateRewind() {
} // otherwise we can reserve more memory } // otherwise we can reserve more memory
// Do the actual saving // Do the actual saving
long ressize; long resize;
if (m_stEmulator.emuWriteMemState(m_psavestate, SZSTATE, ressize)) { if (m_stEmulator.emuWriteMemState(m_psavestate, SZSTATE, resize)) {
/*ressize*=2; // if tell does not return correct size this leverage factor is needed /*resize*=2; // if tell does not return correct size this leverage factor is needed
if (ressize > SZSTATE) ressize = SZSTATE;*/ if (resize > SZSTATE) resize = SZSTATE;*/
g_assert( ressize <= SZSTATE ); g_assert( resize <= SZSTATE );
ressize+=(sizeof(ressize)*8); // some leverage resize+=(sizeof(resize)*8); // some leverage
psavestate = new char[ressize]; psavestate = new char[resize];
memmove(psavestate, &ressize, sizeof(ressize)); // pack size first memmove(psavestate, &resize, sizeof(resize)); // pack size first
memmove(psavestate+sizeof(ressize), m_psavestate, ressize-sizeof(ressize)); // then actual save data memmove(psavestate+sizeof(resize), m_psavestate, resize-sizeof(resize)); // then actual save data
//printf("Wrote %p (%li bytes %i %i)\n", psavestate, ressize, *((long*)psavestate), sizeof(ressize)); //printf("Wrote %p (%li bytes %i %i)\n", psavestate, resize, *((long*)psavestate), sizeof(resize));
m_rewind_load_q.push_front(psavestate); m_rewind_load_q.push_front(psavestate);
return true; return true;
} else { } else {

View File

@ -1438,14 +1438,14 @@ void handleRewinds()
rewindCount = REWIND_NUM; rewindCount = REWIND_NUM;
curSavePos = (rewindTopPos + 1) % rewindCount; // [1] depends on previous curSavePos = (rewindTopPos + 1) % rewindCount; // [1] depends on previous
long ressize; long resize;
if( if(
emulator.emuWriteMemState emulator.emuWriteMemState
&& &&
emulator.emuWriteMemState( emulator.emuWriteMemState(
&rewindMemory[curSavePos*REWIND_SIZE], &rewindMemory[curSavePos*REWIND_SIZE],
REWIND_SIZE, /* available*/ REWIND_SIZE, /* available*/
ressize /* actual size */ resize /* actual size */
) )
) { ) {
char rewMsgBuf[100]; char rewMsgBuf[100];
@ -2208,4 +2208,4 @@ void log(const char *defaultMsg, ...)
va_start(valist, defaultMsg); va_start(valist, defaultMsg);
vfprintf(out, defaultMsg, valist); vfprintf(out, defaultMsg, valist);
va_end(valist); va_end(valist);
} }

View File

@ -1316,9 +1316,9 @@ BOOL VBA::OnIdle(LONG lCount)
rewindCount++; rewindCount++;
if(rewindCount > 8) if(rewindCount > 8)
rewindCount = 8; rewindCount = 8;
long ressize; long resize;
if(emulator.emuWriteMemState(&rewindMemory[rewindPos*REWIND_SIZE], if(emulator.emuWriteMemState(&rewindMemory[rewindPos*REWIND_SIZE],
REWIND_SIZE, ressize)) { /* available and actual size */ REWIND_SIZE, resize)) { /* available and actual size */
rewindPos = ++rewindPos & 7; rewindPos = ++rewindPos & 7;
if(rewindCount == 8) if(rewindCount == 8)
rewindTopPos = ++rewindTopPos & 7; rewindTopPos = ++rewindTopPos & 7;

View File

@ -1107,10 +1107,10 @@ void GameArea::OnIdle(wxIdleEvent &event)
return; return;
} }
long ressize; long resize;
if (!emusys->emuWriteMemState(&rewind_mem[REWIND_SIZE * next_rewind_state], if (!emusys->emuWriteMemState(&rewind_mem[REWIND_SIZE * next_rewind_state],
REWIND_SIZE, ressize /* actual size */)) REWIND_SIZE, resize /* actual size */))
// if you see a lot of these, maybe increase REWIND_SIZE // if you see a lot of these, maybe increase REWIND_SIZE
wxLogInfo(_("Error writing rewind state")); wxLogInfo(_("Error writing rewind state"));
else else

View File

@ -7,4 +7,5 @@ Comment=Nintendo Game Boy Advance Emulator
Exec=wxvbam %f Exec=wxvbam %f
Icon=vbam Icon=vbam
Categories=Game;Emulator; Categories=Game;Emulator;
Keywords=emulator;Nintendo;gameboy;Game Boy;Game Boy Color;Game Boy Advance;
MimeType=application/x-gameboy-rom;application/x-gameboy-advance-rom;application/x-dmg-rom;application/x-agb-rom;application/x-gb-rom;application/x-gba-rom; MimeType=application/x-gameboy-rom;application/x-gameboy-advance-rom;application/x-dmg-rom;application/x-agb-rom;application/x-gb-rom;application/x-gba-rom;