You can subscribe to this list here.
2004 |
Jan
(17) |
Feb
(38) |
Mar
(24) |
Apr
(18) |
May
(75) |
Jun
(2) |
Jul
|
Aug
|
Sep
(21) |
Oct
(3) |
Nov
(19) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(15) |
Jul
(2) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
(8) |
Feb
|
Mar
|
Apr
(6) |
May
(73) |
Jun
(57) |
Jul
(12) |
Aug
(68) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
(4) |
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
(1) |
|
From: Pokemonhacker <pok...@us...> - 2005-09-30 16:06:40
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24013 Modified Files: GBAinline.h Log Message: - Corrected a bug, introduced in my latests changes, in the readhalfword from timers IO Reg. Index: GBAinline.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBAinline.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GBAinline.h 3 Sep 2005 12:28:23 -0000 1.13 --- GBAinline.h 30 Sep 2005 16:06:32 -0000 1.14 *************** *** 208,211 **** --- 208,212 ---- if((address < 0x4000400) && ioReadable[address & 0x3fe]) { + value = READ16LE(((u16 *)&ioMem[address & 0x3fe])); if (((address & 0x3fe)>0xFF) && ((address & 0x3fe)<0x10E)) { *************** *** 222,227 **** value = 0xFFFF - ((timer3Ticks-cpuTotalTicks) >> timer3ClockReload); } - else - value = READ16LE(((u16 *)&ioMem[address & 0x3fe])); } else goto unreadable; --- 223,226 ---- |
From: Pokemonhacker <pok...@us...> - 2005-09-03 12:29:32
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22519 Modified Files: MainWndFile.cpp MapView.cpp MemoryViewerDlg.cpp OamView.cpp PaletteView.cpp TileView.cpp Log Message: SRC : Arm-new.h : - Fixed the clockticks and the bus prefetch emulation. Bios.cpp : - Fixed a bug in void BIOS_BitUnPack(). GBA.cpp : - HBLANK duration now set to 224 ticks. - Added partial clockticks emulation for swi when no bios is used. - Changed the timers handling (and updated the savestate to version 9). - Tweaked the IRQ delay handling ; tweaked the bus prefetch emulation. GBA.h : - Changed the timers handling (and updated the savestate to version 9). GBAinline.h : - Changed the timers handling. Gfx.cpp : - Added 'max number of objects per line' emulation. Gfx.h : - Added 'max number of objects per line' emulation. : - Fixed a display bug (objects overlapping to the right were now shown on the left). thumb.h : - Fixed the clockticks and the bus prefetch emulation. GB : gbCheats.cpp : - Fixed a bug in the code comparison (thx jdratlif). SDL : SDL.cpp : - Made it that the screen is redrawn when you load/save a savestate. WIN32 : MainWndFile.cpp : - Made it that the screen is redrawn when you load/save a savestate. MapView.cpp : - Corrected a crash bug when no rom were loaded. MemoryViewerDlg.cpp : - Corrected a crash bug when no rom were loaded. OamView.cpp : - Corrected a crash bug when no rom were loaded. PaletteView.cpp : - Corrected a crash bug when no rom were loaded. TileView.cpp : - Corrected a crash bug when no rom were loaded. Index: MapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MapView.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MapView.cpp 25 Jun 2005 06:23:31 -0000 1.8 --- MapView.cpp 3 Sep 2005 12:29:23 -0000 1.9 *************** *** 999,1033 **** } ! void MapView::OnSave() { ! CString filename; ! if(theApp.captureFormat == 0) ! filename = "map.png"; ! else ! filename = "map.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! filename, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! if(dlg.getFilterIndex() == 2) ! saveBMP(dlg.GetPathName()); ! else ! savePNG(dlg.GetPathName()); } --- 999,1036 ---- } ! void MapView::OnSave() { ! if(rom != NULL) ! { ! CString filename; ! if(theApp.captureFormat == 0) ! filename = "map.png"; ! else ! filename = "map.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! filename, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! if(dlg.getFilterIndex() == 2) ! saveBMP(dlg.GetPathName()); ! else ! savePNG(dlg.GetPathName()); ! } } Index: MainWndFile.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndFile.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MainWndFile.cpp 25 Jun 2005 06:23:31 -0000 1.10 --- MainWndFile.cpp 3 Sep 2005 12:29:23 -0000 1.11 *************** *** 38,41 **** --- 38,42 ---- extern void remoteCleanUp(); + extern void InterframeCleanup(); void MainWnd::OnFileOpen() *************** *** 255,269 **** filename.Format("%s\\%s%d.sgm", saveDir, buffer, nID); bool res = loadSaveGame(filename); theApp.rewindCount = 0; theApp.rewindCounter = 0; theApp.rewindSaveNeeded = false; ! ! CString format = winResLoadString(IDS_LOADED_STATE_N); ! buffer.Format(format, nID); ! ! systemScreenMessage(buffer); ! return res; } --- 256,275 ---- filename.Format("%s\\%s%d.sgm", saveDir, buffer, nID); + CString format = winResLoadString(IDS_LOADED_STATE_N); + buffer.Format(format, nID); + bool res = loadSaveGame(filename); + if (theApp.paused) + InterframeCleanup(); + + systemScreenMessage(buffer); + + systemDrawScreen(); + theApp.rewindCount = 0; theApp.rewindCounter = 0; theApp.rewindSaveNeeded = false; ! return res; } *************** *** 340,343 **** --- 346,351 ---- systemScreenMessage(buffer); + + systemDrawScreen(); return res; Index: OamView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/OamView.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OamView.cpp 13 May 2004 15:06:55 -0000 1.4 --- OamView.cpp 3 Sep 2005 12:29:23 -0000 1.5 *************** *** 464,498 **** void OamView::OnSave() { ! CString captureBuffer; ! if(theApp.captureFormat == 0) ! captureBuffer = "oam.png"; ! else ! captureBuffer = "oam.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! if(dlg.getFilterIndex() == 2) ! saveBMP(captureBuffer); ! else ! savePNG(captureBuffer); } --- 464,501 ---- void OamView::OnSave() { ! if(rom != NULL) ! { ! CString captureBuffer; ! if(theApp.captureFormat == 0) ! captureBuffer = "oam.png"; ! else ! captureBuffer = "oam.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! if(dlg.getFilterIndex() == 2) ! saveBMP(captureBuffer); ! else ! savePNG(captureBuffer); ! } } Index: MemoryViewerDlg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewerDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MemoryViewerDlg.cpp 13 May 2004 15:06:55 -0000 1.4 --- MemoryViewerDlg.cpp 3 Sep 2005 12:29:23 -0000 1.5 *************** *** 321,363 **** void MemoryViewerDlg::OnSave() { ! MemoryViewerAddressSize dlg; ! CString buffer; ! dlg.setAddress(m_viewer.getCurrentAddress()); ! LPCTSTR exts[] = { ".dmp" }; ! if(dlg.DoModal() == IDOK) { ! CString filter = theApp.winLoadFilter(IDS_FILTER_DUMP); ! CString title = winResLoadString(IDS_SELECT_DUMP_FILE); ! FileDlg file(this, ! buffer, ! filter, ! 0, ! "DMP", ! exts, ! "", ! title, ! true); ! if(file.DoModal() == IDOK) { ! buffer = file.GetPathName(); ! FILE *f = fopen(buffer, "wb"); ! if(f == NULL) { ! systemMessage(IDS_ERROR_CREATING_FILE, buffer); ! return; ! } ! int size = dlg.getSize(); ! u32 addr = dlg.getAddress(); ! for(int i = 0; i < size; i++) { ! fputc(CPUReadByteQuick(addr), f); ! addr++; ! } ! fclose(f); } } --- 321,366 ---- void MemoryViewerDlg::OnSave() { ! if(rom != NULL) ! { ! MemoryViewerAddressSize dlg; ! CString buffer; ! dlg.setAddress(m_viewer.getCurrentAddress()); ! LPCTSTR exts[] = { ".dmp" }; ! if(dlg.DoModal() == IDOK) { ! CString filter = theApp.winLoadFilter(IDS_FILTER_DUMP); ! CString title = winResLoadString(IDS_SELECT_DUMP_FILE); ! FileDlg file(this, ! buffer, ! filter, ! 0, ! "DMP", ! exts, ! "", ! title, ! true); ! if(file.DoModal() == IDOK) { ! buffer = file.GetPathName(); ! FILE *f = fopen(buffer, "wb"); ! if(f == NULL) { ! systemMessage(IDS_ERROR_CREATING_FILE, buffer); ! return; ! } ! int size = dlg.getSize(); ! u32 addr = dlg.getAddress(); ! for(int i = 0; i < size; i++) { ! fputc(CPUReadByteQuick(addr), f); ! addr++; ! } ! fclose(f); ! } } } *************** *** 366,420 **** void MemoryViewerDlg::OnLoad() { ! CString buffer; ! LPCTSTR exts[] = { ".dmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_DUMP); ! CString title = winResLoadString(IDS_SELECT_DUMP_FILE); ! FileDlg file(this, ! buffer, ! filter, ! 0, ! "DMP", ! exts, ! "", ! title, ! false); ! if(file.DoModal() == IDOK) { ! buffer = file.GetPathName(); ! FILE *f = fopen(buffer, "rb"); ! if(f == NULL) { ! systemMessage(IDS_CANNOT_OPEN_FILE, ! "Cannot open file %s", ! buffer); ! return; ! } ! MemoryViewerAddressSize dlg; ! fseek(f, 0, SEEK_END); ! int size = ftell(f); ! fseek(f, 0, SEEK_SET); ! dlg.setAddress(m_viewer.getCurrentAddress()); ! dlg.setSize(size); ! if(dlg.DoModal() == IDOK) { ! int size = dlg.getSize(); ! u32 addr = dlg.getAddress(); ! for(int i = 0; i < size; i++) { ! int c = fgetc(f); ! if(c == -1) ! break; ! CPUWriteByteQuick(addr, c); ! addr++; } ! OnRefresh(); } ! fclose(f); ! } } --- 369,426 ---- void MemoryViewerDlg::OnLoad() { ! if(rom != NULL) ! { ! CString buffer; ! LPCTSTR exts[] = { ".dmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_DUMP); ! CString title = winResLoadString(IDS_SELECT_DUMP_FILE); ! FileDlg file(this, ! buffer, ! filter, ! 0, ! "DMP", ! exts, ! "", ! title, ! false); ! if(file.DoModal() == IDOK) { ! buffer = file.GetPathName(); ! FILE *f = fopen(buffer, "rb"); ! if(f == NULL) { ! systemMessage(IDS_CANNOT_OPEN_FILE, ! "Cannot open file %s", ! buffer); ! return; ! } ! MemoryViewerAddressSize dlg; ! fseek(f, 0, SEEK_END); ! int size = ftell(f); ! fseek(f, 0, SEEK_SET); ! dlg.setAddress(m_viewer.getCurrentAddress()); ! dlg.setSize(size); ! if(dlg.DoModal() == IDOK) { ! int size = dlg.getSize(); ! u32 addr = dlg.getAddress(); ! for(int i = 0; i < size; i++) { ! int c = fgetc(f); ! if(c == -1) ! break; ! CPUWriteByteQuick(addr, c); ! addr++; ! } ! OnRefresh(); } ! fclose(f); } ! } } Index: TileView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/TileView.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TileView.cpp 13 May 2004 15:06:55 -0000 1.2 --- TileView.cpp 3 Sep 2005 12:29:23 -0000 1.3 *************** *** 266,301 **** void TileView::OnSave() { ! CString captureBuffer; ! if(theApp.captureFormat == 0) ! captureBuffer = "tiles.png"; ! else ! captureBuffer = "tiles.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! if(dlg.getFilterIndex() == 2) ! saveBMP(captureBuffer); ! else ! savePNG(captureBuffer); } --- 266,304 ---- void TileView::OnSave() { ! if(rom != NULL) ! { ! CString captureBuffer; ! if(theApp.captureFormat == 0) ! captureBuffer = "tiles.png"; ! else ! captureBuffer = "tiles.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! if(dlg.getFilterIndex() == 2) ! saveBMP(captureBuffer); ! else ! savePNG(captureBuffer); ! } } Index: PaletteView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/PaletteView.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PaletteView.cpp 31 Oct 2004 18:25:40 -0000 1.5 --- PaletteView.cpp 3 Sep 2005 12:29:23 -0000 1.6 *************** *** 110,158 **** void PaletteView::save(int which) { ! CString captureBuffer; ! if(which == 0) ! captureBuffer = "bg.pal"; ! else ! captureBuffer = "obj.pal"; ! LPCTSTR exts[] = {".pal", ".pal", ".act" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PAL); ! CString title = winResLoadString(IDS_SELECT_PALETTE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! 1, ! "PAL", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! PaletteViewControl *p = NULL; ! if(which == 0) ! p = &paletteView; ! else ! p = &paletteViewOBJ; ! switch(dlg.getFilterIndex()) { ! case 0: ! case 1: ! p->saveMSPAL(captureBuffer); ! break; ! case 2: ! p->saveJASCPAL(captureBuffer); ! break; ! case 3: ! p->saveAdobe(captureBuffer); ! break; } } --- 110,161 ---- void PaletteView::save(int which) { ! if(rom != NULL) ! { ! CString captureBuffer; ! if(which == 0) ! captureBuffer = "bg.pal"; ! else ! captureBuffer = "obj.pal"; ! LPCTSTR exts[] = {".pal", ".pal", ".act" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PAL); ! CString title = winResLoadString(IDS_SELECT_PALETTE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! 1, ! "PAL", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! PaletteViewControl *p = NULL; ! if(which == 0) ! p = &paletteView; ! else ! p = &paletteViewOBJ; ! switch(dlg.getFilterIndex()) { ! case 0: ! case 1: ! p->saveMSPAL(captureBuffer); ! break; ! case 2: ! p->saveJASCPAL(captureBuffer); ! break; ! case 3: ! p->saveAdobe(captureBuffer); ! break; ! } } } |
From: Pokemonhacker <pok...@us...> - 2005-09-03 12:29:07
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22424 Modified Files: SDL.cpp Log Message: SRC : Arm-new.h : - Fixed the clockticks and the bus prefetch emulation. Bios.cpp : - Fixed a bug in void BIOS_BitUnPack(). GBA.cpp : - HBLANK duration now set to 224 ticks. - Added partial clockticks emulation for swi when no bios is used. - Changed the timers handling (and updated the savestate to version 9). - Tweaked the IRQ delay handling ; tweaked the bus prefetch emulation. GBA.h : - Changed the timers handling (and updated the savestate to version 9). GBAinline.h : - Changed the timers handling. Gfx.cpp : - Added 'max number of objects per line' emulation. Gfx.h : - Added 'max number of objects per line' emulation. : - Fixed a display bug (objects overlapping to the right were now shown on the left). thumb.h : - Fixed the clockticks and the bus prefetch emulation. GB : gbCheats.cpp : - Fixed a bug in the code comparison (thx jdratlif). SDL : SDL.cpp : - Made it that the screen is redrawn when you load/save a savestate. WIN32 : MainWndFile.cpp : - Made it that the screen is redrawn when you load/save a savestate. MapView.cpp : - Corrected a crash bug when no rom were loaded. MemoryViewerDlg.cpp : - Corrected a crash bug when no rom were loaded. OamView.cpp : - Corrected a crash bug when no rom were loaded. PaletteView.cpp : - Corrected a crash bug when no rom were loaded. TileView.cpp : - Corrected a crash bug when no rom were loaded. Index: SDL.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/SDL.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SDL.cpp 25 Jun 2005 06:17:52 -0000 1.7 --- SDL.cpp 3 Sep 2005 12:28:53 -0000 1.8 *************** *** 1357,1364 **** --- 1357,1368 ---- else sprintf(stateName,"%s%d.sgm", filename, num+1); + if(emulator.emuWriteState) emulator.emuWriteState(stateName); + sprintf(stateName, "Wrote state %d", num+1); systemScreenMessage(stateName); + + systemDrawScreen(); } *************** *** 1378,1381 **** --- 1382,1387 ---- sprintf(stateName, "Loaded state %d", num+1); systemScreenMessage(stateName); + + systemDrawScreen(); } |
From: Pokemonhacker <pok...@us...> - 2005-09-03 12:28:49
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22388 Modified Files: gbCheats.cpp Log Message: SRC : Arm-new.h : - Fixed the clockticks and the bus prefetch emulation. Bios.cpp : - Fixed a bug in void BIOS_BitUnPack(). GBA.cpp : - HBLANK duration now set to 224 ticks. - Added partial clockticks emulation for swi when no bios is used. - Changed the timers handling (and updated the savestate to version 9). - Tweaked the IRQ delay handling ; tweaked the bus prefetch emulation. GBA.h : - Changed the timers handling (and updated the savestate to version 9). GBAinline.h : - Changed the timers handling. Gfx.cpp : - Added 'max number of objects per line' emulation. Gfx.h : - Added 'max number of objects per line' emulation. : - Fixed a display bug (objects overlapping to the right were now shown on the left). thumb.h : - Fixed the clockticks and the bus prefetch emulation. GB : gbCheats.cpp : - Fixed a bug in the code comparison (thx jdratlif). SDL : SDL.cpp : - Made it that the screen is redrawn when you load/save a savestate. WIN32 : MainWndFile.cpp : - Made it that the screen is redrawn when you load/save a savestate. MapView.cpp : - Corrected a crash bug when no rom were loaded. MemoryViewerDlg.cpp : - Corrected a crash bug when no rom were loaded. OamView.cpp : - Corrected a crash bug when no rom were loaded. PaletteView.cpp : - Corrected a crash bug when no rom were loaded. TileView.cpp : - Corrected a crash bug when no rom were loaded. Index: gbCheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbCheats.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gbCheats.cpp 13 May 2004 15:06:46 -0000 1.7 --- gbCheats.cpp 3 Sep 2005 12:28:39 -0000 1.8 *************** *** 1,5 **** // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten ! // Copyright (C) 2004 Forgotten and the VBA development team // This program is free software; you can redistribute it and/or modify --- 1,5 ---- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten ! // Copyright (C) 2005 Forgotten and the VBA development team // This program is free software; you can redistribute it and/or modify *************** *** 339,343 **** gbCheatList[i].compare = compare; ! gbCheatList[i].code = 0; } --- 339,345 ---- gbCheatList[i].compare = compare; ! //gbCheatList[i].code = 0; ! gbCheatList[i].code = 0x100; // fix for compare value ! } |
From: Pokemonhacker <pok...@us...> - 2005-09-03 12:28:35
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22301 Modified Files: arm-new.h bios.cpp GBA.cpp GBA.h GBAinline.h Gfx.cpp Gfx.h thumb.h Log Message: SRC : Arm-new.h : - Fixed the clockticks and the bus prefetch emulation. Bios.cpp : - Fixed a bug in void BIOS_BitUnPack(). GBA.cpp : - HBLANK duration now set to 224 ticks. - Added partial clockticks emulation for swi when no bios is used. - Changed the timers handling (and updated the savestate to version 9). - Tweaked the IRQ delay handling ; tweaked the bus prefetch emulation. GBA.h : - Changed the timers handling (and updated the savestate to version 9). GBAinline.h : - Changed the timers handling. Gfx.cpp : - Added 'max number of objects per line' emulation. Gfx.h : - Added 'max number of objects per line' emulation. : - Fixed a display bug (objects overlapping to the right were now shown on the left). thumb.h : - Fixed the clockticks and the bus prefetch emulation. GB : gbCheats.cpp : - Fixed a bug in the code comparison (thx jdratlif). SDL : SDL.cpp : - Made it that the screen is redrawn when you load/save a savestate. WIN32 : MainWndFile.cpp : - Made it that the screen is redrawn when you load/save a savestate. MapView.cpp : - Corrected a crash bug when no rom were loaded. MemoryViewerDlg.cpp : - Corrected a crash bug when no rom were loaded. OamView.cpp : - Corrected a crash bug when no rom were loaded. PaletteView.cpp : - Corrected a crash bug when no rom were loaded. TileView.cpp : - Corrected a crash bug when no rom were loaded. Index: Gfx.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Gfx.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Gfx.cpp 13 May 2004 15:06:44 -0000 1.2 --- Gfx.cpp 3 Sep 2005 12:28:23 -0000 1.3 *************** *** 23,27 **** 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}; - u32 line0[240]; u32 line1[240]; --- 23,26 ---- *************** *** 33,36 **** --- 32,36 ---- bool gfxInWin0[240]; bool gfxInWin1[240]; + int lineOBJpixleft[128]; int gfxBG2Changed = 0; Index: thumb.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/thumb.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** thumb.h 25 Jun 2005 06:12:26 -0000 1.14 --- thumb.h 3 Sep 2005 12:28:23 -0000 1.15 *************** *** 768,777 **** busPrefetch = false; ! if (busPrefetchCount<0) ! busPrefetchCount=0; ! if (busPrefetchCount>16) ! busPrefetchCount=8; ! ! clockTicks = codeTicksAccessSeq16(armNextPC)+1; #ifndef FINAL_VERSION if(armNextPC == stop) { [...1639 lines suppressed...] reg[14].I = temp|1; THUMB_PREFETCH; ! clockTicks = codeTicksAccessSeq16(armNextPC) + ! codeTicksAccess16(armNextPC) + codeTicksAccessSeq16(armNextPC) + 3; ! busPrefetchCount = 0; } break; *************** *** 2669,2671 **** CPUUndefinedException(); break; ! } \ No newline at end of file --- 2181,2186 ---- CPUUndefinedException(); break; ! } ! ! if (clockTicks==0) ! clockTicks = codeTicksAccessSeq16(oldArmNextPC) + 1; Index: GBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** GBA.cpp 25 Jun 2005 06:26:33 -0000 1.62 --- GBA.cpp 3 Sep 2005 12:28:23 -0000 1.63 *************** *** 43,47 **** #endif ! #define UPDATE_REG(address, value) WRITE16LE(((u16 *)&ioMem[address]),value) #define ARM_PREFETCH \ --- 43,50 ---- #endif ! #define UPDATE_REG(address, value)\ ! {\ [...1700 lines suppressed...] break; + } } } + + struct EmulatedSystem GBASystem = { // emuMain *************** *** 4232,4234 **** 5000 #endif ! }; --- 4344,4346 ---- 5000 #endif ! }; \ No newline at end of file Index: GBA.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** GBA.h 25 Jun 2005 06:26:33 -0000 1.21 --- GBA.h 3 Sep 2005 12:28:23 -0000 1.22 *************** *** 31,35 **** #define SAVE_GAME_VERSION_7 7 #define SAVE_GAME_VERSION_8 8 ! #define SAVE_GAME_VERSION SAVE_GAME_VERSION_8 typedef struct { --- 31,36 ---- #define SAVE_GAME_VERSION_7 7 #define SAVE_GAME_VERSION_8 8 ! #define SAVE_GAME_VERSION_9 9 ! #define SAVE_GAME_VERSION SAVE_GAME_VERSION_9 typedef struct { *************** *** 103,106 **** --- 104,108 ---- extern void doMirroring(bool); extern void CPUUpdateRegister(u32, u16); + extern void applyTimer (); extern void CPUWriteHalfWord(u32, u16); extern void CPUWriteByte(u32, u8); Index: GBAinline.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBAinline.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** GBAinline.h 25 Jun 2005 06:26:33 -0000 1.12 --- GBAinline.h 3 Sep 2005 12:28:23 -0000 1.13 *************** *** 31,34 **** --- 31,47 ---- extern bool cpuDmaHack; extern u32 cpuDmaLast; + extern bool timer0On; + extern int timer0Ticks; + extern int timer0ClockReload; + extern bool timer1On; + extern int timer1Ticks; + extern int timer1ClockReload; + extern bool timer2On; + extern int timer2Ticks; + extern int timer2ClockReload; + extern bool timer3On; + extern int timer3Ticks; + extern int timer3ClockReload; + extern int cpuTotalTicks; #define CPUReadByteQuick(addr) \ *************** *** 194,198 **** case 4: if((address < 0x4000400) && ioReadable[address & 0x3fe]) ! value = READ16LE(((u16 *)&ioMem[address & 0x3fe])); else goto unreadable; break; --- 207,228 ---- case 4: if((address < 0x4000400) && ioReadable[address & 0x3fe]) ! { ! if (((address & 0x3fe)>0xFF) && ((address & 0x3fe)<0x10E)) ! { ! if (((address & 0x3fe) == 0x100) && timer0On) ! value = 0xFFFF - ((timer0Ticks-cpuTotalTicks) >> timer0ClockReload); ! else ! if (((address & 0x3fe) == 0x104) && timer1On && !(TM1CNT & 4)) ! value = 0xFFFF - ((timer1Ticks-cpuTotalTicks) >> timer1ClockReload); ! else ! if (((address & 0x3fe) == 0x108) && timer2On && !(TM2CNT & 4)) ! value = 0xFFFF - ((timer2Ticks-cpuTotalTicks) >> timer2ClockReload); ! else ! if (((address & 0x3fe) == 0x10C) && timer3On && !(TM3CNT & 4)) ! value = 0xFFFF - ((timer3Ticks-cpuTotalTicks) >> timer3ClockReload); ! } ! else ! value = READ16LE(((u16 *)&ioMem[address & 0x3fe])); ! } else goto unreadable; break; Index: bios.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/bios.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** bios.cpp 25 Jun 2005 06:14:08 -0000 1.17 --- bios.cpp 3 Sep 2005 12:28:23 -0000 1.18 *************** *** 154,158 **** int len = CPUReadHalfWord(header); ! // check address int bits = CPUReadByte(header+2); int revbits = 8 - bits; --- 154,162 ---- int len = CPUReadHalfWord(header); ! // check address ! if(((source & 0xe000000) == 0) || ! ((source + len) & 0xe000000) == 0) ! return; ! int bits = CPUReadByte(header+2); int revbits = 8 - bits; *************** *** 178,182 **** u32 d = b & mask; u32 temp = d >> bitcount; ! if(!temp && addBase) { temp += base; } --- 182,186 ---- u32 d = b & mask; u32 temp = d >> bitcount; ! if(d || addBase) { temp += base; } Index: arm-new.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/arm-new.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** arm-new.h 25 Jun 2005 06:11:56 -0000 1.15 --- arm-new.h 3 Sep 2005 12:28:23 -0000 1.16 *************** *** 1115,1119 **** \ if ((dest == 15)||((opcode & 0x02000010)==0x10))\ ! clockTicks = 2+codeTicksAccess32(armNextPC);\ if(shift) {\ LOGICAL_LSL_REG\ --- 1115,1123 ---- \ if ((dest == 15)||((opcode & 0x02000010)==0x10))\ ! {\ ! clockTicks = 1+codeTicksAccess32(armNextPC);\ [...6614 lines suppressed...] CPUSoftwareInterrupt(opcode & 0x00FFFFFF); --- 8657,8664 ---- CASE_256(0xf00) // SWI <comment> ! clockTicks = codeTicksAccessSeq32(armNextPC) + 1; clockTicks += 2 + codeTicksAccess32(armNextPC) + codeTicksAccessSeq32(armNextPC); + busPrefetchCount=0; CPUSoftwareInterrupt(opcode & 0x00FFFFFF); *************** *** 8356,8357 **** --- 8697,8701 ---- } } + + if (clockTicks == 0) + clockTicks = codeTicksAccessSeq32(oldArmNextPC) + 1; \ No newline at end of file Index: Gfx.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Gfx.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Gfx.h 17 Jul 2005 18:57:08 -0000 1.16 --- Gfx.h 3 Sep 2005 12:28:23 -0000 1.17 *************** *** 101,104 **** --- 101,105 ---- extern bool gfxInWin0[240]; extern bool gfxInWin1[240]; + extern int lineOBJpixleft[128]; extern int gfxBG2Changed; *************** *** 732,735 **** --- 733,740 ---- inline void gfxDrawSprites(u32 *lineOBJ) { + // lineOBJpix is used to keep track of the drawn OBJs + // and to stop drawing them if the 'maximum number of OBJ per line' + // has been reached. + int lineOBJpix = (DISPCNT & 0x20) ? 954 : 1226; int m=0; gfxClearArray(lineOBJ); *************** *** 745,797 **** sprites++; ! // ignore OBJ-WIN ! if((a0 & 0x0c00) == 0x0800) ! continue; ! ! int sizeY = 8; ! int sizeX = 8; ! ! switch(((a0 >>12) & 0x0c)|(a1>>14)) { ! case 0: ! break; ! case 1: ! sizeX = sizeY = 16; ! break; ! case 2: ! sizeX = sizeY = 32; ! break; ! case 3: ! sizeX = sizeY = 64; ! break; ! case 4: ! sizeX = 16; ! break; ! case 5: ! sizeX = 32; ! break; ! case 6: ! sizeX = 32; ! sizeY = 16; ! break; ! case 7: ! sizeX = 64; ! sizeY = 32; ! break; ! case 8: ! sizeY = 16; ! break; ! case 9: ! sizeY = 32; ! break; ! case 10: ! sizeX = 16; ! sizeY = 32; ! break; ! case 11: ! sizeX = 32; ! sizeY = 64; ! break; ! default: continue; } --- 750,784 ---- sprites++; ! lineOBJpixleft[x]=lineOBJpix; ! ! lineOBJpix-=2; ! if (lineOBJpix<=0) continue; + + if ((a0 & 0x0c00) == 0x0c00) + a0 &=0xF3FF; + + if ((a0>>14) == 3) + { + a0 &= 0x3FFF; + a1 &= 0x3FFF; + } + + int sizeX = 8<<(a1>>14); + int sizeY = sizeX; + + if ((a0>>14) & 1) + { + if (sizeX<32) + sizeX<<=1; + if (sizeY>8) + sizeY>>=1; + } + else if ((a0>>14) & 2) + { + if (sizeX>8) + sizeX>>=1; + if (sizeY<32) + sizeY<<=1; } *************** *** 802,808 **** int sy = (a0 & 255); - if(sy > 160) - sy -= 256; if(a0 & 0x0100) { --- 789,831 ---- int sy = (a0 & 255); + int sx = (a1 & 0x1FF); + + // computes ticks used by OBJ-WIN if OBJWIN is enabled + if (((a0 & 0x0c00) == 0x0800) && (layerEnable & 0x8000)) + { + if ((a0 & 0x0300) == 0x0300) + { + sizeX<<=1; + sizeY<<=1; + } + if((sy+sizeY) > 256) + sy -= 256; + if ((sx+sizeX)> 512) + sx-=512; + if (sx<0) + { + sizeX+=sx; + sx = 0; + } + else if ((sx+sizeX)>240) + sizeX=240-sx; + if ((VCOUNT>=sy) && (VCOUNT<sy+sizeY) && (sx<240)) + { + if (a0 & 0x0100) + lineOBJpix-=8+2*sizeX; + else + lineOBJpix-=sizeX-2; + } + continue; + } + // else ignores OBJ-WIN if OBJWIN is disabled, and ignored disabled OBJ + else + if(((a0 & 0x0c00) == 0x0800) || ((a0 & 0x0300) == 0x0200)) + continue; + + if (lineOBJpix<0) + continue; + if(a0 & 0x0100) { *************** *** 813,821 **** fieldY <<= 1; } ! int t = VCOUNT - sy; if((t >= 0) && (t < fieldY)) { ! int sx = (a1 & 0x1FF); ! if((sx < 240) || (((sx + fieldX) & 511) < 240)) { // int t2 = t - (fieldY >> 1); int rot = (a1 >> 9) & 0x1F; --- 836,851 ---- fieldY <<= 1; } ! if((sy+fieldY) > 256) ! sy -= 256; int t = VCOUNT - sy; if((t >= 0) && (t < fieldY)) { ! int startpix = 0; ! if ((sx+fieldX)> 512) ! { ! startpix=512-sx; ! } ! if (lineOBJpix>0) ! if((sx < 240) || startpix) { ! lineOBJpix-=8; // int t2 = t - (fieldY >> 1); int rot = (a1 >> 9) & 0x1F; *************** *** 855,858 **** --- 885,892 ---- c &= 0x3FE; for(int x = 0; x < fieldX; x++) { + if (x >= startpix) + lineOBJpix-=2; + if (lineOBJpix<0) + continue; int xxx = realX >> 8; int yyy = realY >> 8; *************** *** 886,890 **** #endif } ! sx = (sx+1)&511;; realX += dx; realY += dy; --- 920,924 ---- #endif } ! sx = (sx+1)&511; realX += dx; realY += dy; *************** *** 898,903 **** if(DISPCNT & 0x40) inc = sizeX >> 3; ! int palette = (a2 >> 8) & 0xF0; for(int x = 0; x < fieldX; x++) { int xxx = realX >> 8; int yyy = realY >> 8; --- 932,941 ---- if(DISPCNT & 0x40) inc = sizeX >> 3; ! int palette = (a2 >> 8) & 0xF0; for(int x = 0; x < fieldX; x++) { + if (x >= startpix) + lineOBJpix-=2; + if (lineOBJpix<0) + continue; int xxx = realX >> 8; int yyy = realY >> 8; *************** *** 935,939 **** lineOBJ[sx] = 0x001F; #endif ! sx = (sx+1)&511;; realX += dx; realY += dy; --- 973,977 ---- lineOBJ[sx] = 0x001F; #endif ! sx = (sx+1)&511; realX += dx; realY += dy; *************** *** 944,951 **** } } else { int t = VCOUNT - sy; if((t >= 0) && (t < sizeY)) { ! int sx = (a1 & 0x1FF); ! if(((sx < 240)||(((sx+sizeX)&511)<240)) && !(a0 & 0x0200)) { if(a0 & 0x2000) { if(a1 & 0x2000) --- 982,996 ---- } } else { + if(sy+sizeY > 256) + sy -= 256; int t = VCOUNT - sy; if((t >= 0) && (t < sizeY)) { ! int startpix = 0; ! if ((sx+sizeX)> 512) ! { ! startpix=512-sx; ! } ! if((sx < 240) || startpix) { ! lineOBJpix+=2; if(a0 & 0x2000) { if(a1 & 0x2000) *************** *** 977,980 **** --- 1022,1029 ---- for(int xx = 0; xx < sizeX; xx++) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1049,1052 **** --- 1098,1105 ---- xxx = 7; for(int xx = sizeX - 1; xx >= 0; xx--) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1089,1092 **** --- 1142,1149 ---- } else { for(int xx = 0; xx < sizeX; xx++) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1140,1147 **** { gfxClearArray(lineOBJWin); ! if(layerEnable & 0x8000) { u16 *sprites = (u16 *)oam; // u16 *spritePalette = &((u16 *)paletteRAM)[256]; for(int x = 0; x < 128 ; x++) { u16 a0 = READ16LE(sprites++); u16 a1 = READ16LE(sprites++); --- 1197,1205 ---- { gfxClearArray(lineOBJWin); ! if((layerEnable & 0x9000) == 0x9000) { u16 *sprites = (u16 *)oam; // u16 *spritePalette = &((u16 *)paletteRAM)[256]; for(int x = 0; x < 128 ; x++) { + int lineOBJpix = lineOBJpixleft[x]; u16 a0 = READ16LE(sprites++); u16 a1 = READ16LE(sprites++); *************** *** 1149,1207 **** sprites++; ! // ignore non OBJ-WIN ! if((a0 & 0x0c00) != 0x0800) continue; ! int sizeY = 8; ! int sizeX = 8; ! switch(((a0 >>12) & 0x0c)|(a1>>14)) { ! case 0: ! break; ! case 1: ! sizeX = sizeY = 16; ! break; ! case 2: ! sizeX = sizeY = 32; ! break; ! case 3: ! sizeX = sizeY = 64; ! break; ! case 4: ! sizeX = 16; ! break; ! case 5: ! sizeX = 32; ! break; ! case 6: ! sizeX = 32; ! sizeY = 16; ! break; ! case 7: ! sizeX = 64; ! sizeY = 32; ! break; ! case 8: ! sizeY = 16; ! break; ! case 9: ! sizeY = 32; ! break; ! case 10: ! sizeX = 16; ! sizeY = 32; ! break; ! case 11: ! sizeX = 32; ! sizeY = 64; ! break; ! default: ! continue; } int sy = (a0 & 255); - - if(sy > 160) - sy -= 256; if(a0 & 0x0100) { --- 1207,1245 ---- sprites++; ! if (lineOBJpix<=0) continue; + + // ignores non OBJ-WIN and disabled OBJ-WIN + if(((a0 & 0x0c00) != 0x0800) || ((a0 & 0x0300) == 0x0200)) + continue; + + if ((a0 & 0x0c00) == 0x0c00) + a0 &=0xF3FF; ! if ((a0>>14) == 3) ! { ! a0 &= 0x3FFF; ! a1 &= 0x3FFF; ! } ! int sizeX = 8<<(a1>>14); ! int sizeY = sizeX; ! ! if ((a0>>14) & 1) ! { ! if (sizeX<32) ! sizeX<<=1; ! if (sizeY>8) ! sizeY>>=1; ! } ! else if ((a0>>14) & 2) ! { ! if (sizeX>8) ! sizeX>>=1; ! if (sizeY<32) ! sizeY<<=1; } int sy = (a0 & 255); if(a0 & 0x0100) { *************** *** 1212,1220 **** fieldY <<= 1; } ! int t = VCOUNT - sy; if((t >= 0) && (t < fieldY)) { int sx = (a1 & 0x1FF); ! if((sx < 240) || (((sx + fieldX) & 511) < 240)) { // int t2 = t - (fieldY >> 1); int rot = (a1 >> 9) & 0x1F; --- 1250,1265 ---- fieldY <<= 1; } ! if((sy+fieldY) > 256) ! sy -= 256; int t = VCOUNT - sy; if((t >= 0) && (t < fieldY)) { int sx = (a1 & 0x1FF); ! int startpix = 0; ! if ((sx+fieldX)> 512) ! { ! startpix=512-sx; ! } ! if((sx < 240) || startpix) { ! lineOBJpix-=8; // int t2 = t - (fieldY >> 1); int rot = (a1 >> 9) & 0x1F; *************** *** 1250,1253 **** --- 1295,1302 ---- c &= 0x3FE; for(int x = 0; x < fieldX; x++) { + if (x >= startpix) + lineOBJpix-=2; + if (lineOBJpix<0) + continue; int xxx = realX >> 8; int yyy = realY >> 8; *************** *** 1264,1268 **** } } ! sx = (sx+1)&511;; realX += dx; realY += dy; --- 1313,1317 ---- } } ! sx = (sx+1)&511; realX += dx; realY += dy; *************** *** 1278,1281 **** --- 1327,1334 ---- // int palette = (a2 >> 8) & 0xF0; for(int x = 0; x < fieldX; x++) { + if (x >= startpix) + lineOBJpix-=2; + if (lineOBJpix<0) + continue; int xxx = realX >> 8; int yyy = realY >> 8; *************** *** 1287,1291 **** if(xxx < 0 || xxx >= sizeX || yyy < 0 || yyy >= sizeY || ! sx >= 240){ } else { u32 color = vram[0x10000 + ((((c + (yyy>>3) * inc)<<5) --- 1340,1344 ---- if(xxx < 0 || xxx >= sizeX || yyy < 0 || yyy >= sizeY || ! sx >= 240) { } else { u32 color = vram[0x10000 + ((((c + (yyy>>3) * inc)<<5) *************** *** 1302,1306 **** } // } ! sx = (sx+1)&511;; realX += dx; realY += dy; --- 1355,1359 ---- } // } ! sx = (sx+1)&511; realX += dx; realY += dy; *************** *** 1310,1317 **** } } else { int t = VCOUNT - sy; if((t >= 0) && (t < sizeY)) { int sx = (a1 & 0x1FF); ! if(((sx < 240)||(((sx+sizeX)&511)<240)) && !(a0 & 0x0200)) { if(a0 & 0x2000) { if(a1 & 0x2000) --- 1363,1378 ---- } } else { + if((sy+sizeY) > 256) + sy -= 256; int t = VCOUNT - sy; if((t >= 0) && (t < sizeY)) { int sx = (a1 & 0x1FF); ! int startpix = 0; ! if ((sx+sizeX)> 512) ! { ! startpix=512-sx; ! } ! if((sx < 240) || startpix) { ! lineOBJpix+=2; if(a0 & 0x2000) { if(a1 & 0x2000) *************** *** 1336,1339 **** --- 1397,1404 ---- // u32 prio = (((a2 >> 10) & 3) << 25) | ((a0 & 0x0c00)<<6); for(int xx = 0; xx < sizeX; xx++) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1385,1388 **** --- 1450,1457 ---- xxx = 7; for(int xx = sizeX - 1; xx >= 0; xx--) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1409,1412 **** --- 1478,1485 ---- } else { for(int xx = 0; xx < sizeX; xx++) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; |