Skip to content

Instantly share code, notes, and snippets.

@simias
simias / log.txt
Last active January 22, 2016 19:11
RetroArch [INFO] :: Config: loading config from: /home/simias/.config/retroarch/retroarch.cfg.
RetroArch [INFO] :: Environ SET_PIXEL_FORMAT: RGB565.
RetroArch [INFO] :: Version of libretro API: 1
RetroArch [INFO] :: Compiled against API: 1
RetroArch [INFO] :: Threaded rarch_task started
RetroArch [INFO] :: Set audio input rate to: 29999.99 Hz.
RetroArch [INFO] :: Found shader "/home/simias/.config/retroarch/shaders/retroarch.cgp"
RetroArch [INFO] :: Video @ 320x240
RetroArch [INFO] :: Found GL context: glx
RetroArch [INFO] :: Detecting screen resolution 1200x1920.
RetroArch [INFO] :: Loading content file: /home/simias/sync/roms/gb/Picross 2 (Japan) (SGB Enhanced).gb.
retro_read_file: Failed to open /home/simias/sync/roms/gb/Picross 2 (Japan) (SGB Enhanced).ips: No such file or directory
retro_read_file: Failed to open /home/simias/sync/roms/gb/Picross 2 (Japan) (SGB Enhanced).bps: No such file or directory
retro_read_file: Failed to open /home/simias/sync/roms/gb/Picross 2 (Japan) (SGB Enhanced).ups: No such file or directory
RetroArch [INFO] :: Did not find a valid content patch.
retro_read_file: Failed to open {: No such file or directory
RetroArch [INFO] :: Loading state: "{".
RetroArch [ERROR] :: Failed to load state from "{".
RetroArch [INFO] :: CRC32: 0xf5aa5902 .
RetroArch [INFO] :: Skipping SRAM load..
RetroArch [INFO] :: Environ GET_VARIABLE rustation_internal_upscale_factor:
RetroArch [INFO] :: 2
RetroArch [INFO] :: Environ SET_SYSTEM_AV_INFO.
RetroArch [libretro DEBUG] :: OpenGL context destroy
RetroArch [INFO] :: [X11]: Xinerama version: 1.1.
RetroArch [INFO] :: [X11]: Xinerama screens: 1.
RetroArch [INFO] :: [X11]: Saved monitor #0.
RetroArch [INFO] :: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
RetroArch [INFO] :: Set audio input rate to: 44240.07 Hz.
RetroArch [INFO] :: Found shader "/home/simias/.config/retroarch/shaders/retroarch.cgp"
% Initializing PSXSDK...
% malloc setup.
% 372: a5362c93
% 373: 3400deed
% 374: 3400aabc
% 375: 3400cafe
% Pass.
Registers:
pc: 0x0100 [00 C3 50 ...]
sp: 0xfffe [CA 00 31 ...]
af: 0x01b0 a: 1 f: 176
bc: 0x0013 b: 0 c: 19
de: 0x00d8 d: 0 d: 216
hl: 0x014d h: 1 l: 77 [hl]: [0A 16 ...]
Flags:
z: 1 n: 0 h: 1 c: 1
iten: true halted: false
00000000 3c 02 00 1f 4c 69 63 65 6e 73 65 64 20 62 79 20 |<...Licensed by |
00000010 53 6f 6e 79 20 43 6f 6d 70 75 74 65 72 20 45 6e |Sony Computer En|
00000020 74 65 72 74 61 69 6e 6d 65 6e 74 20 49 6e 63 2e |tertainment Inc.|
00000030 41 63 74 69 6f 6e 52 65 70 6c 61 79 20 61 6e 64 |ActionReplay and|
00000040 20 43 61 65 74 6c 61 20 61 72 65 20 4e 4f 54 20 | Caetla are NOT |
00000050 6c 69 63 65 6e 73 65 64 20 62 79 20 53 6f 6e 79 |licensed by Sony|
00000060 20 43 6f 6d 70 75 74 65 72 20 45 6e 74 65 72 74 | Computer Entert|
00000070 61 69 6e 6d 65 6e 74 20 49 6e 63 21 00 00 33 00 |ainment Inc!..3.|
00000080 20 01 00 1f 4c 69 63 65 6e 73 65 64 20 62 79 20 | ...Licensed by |
00000090 53 6f 6e 79 20 43 6f 6d 70 75 74 65 72 20 45 6e |Sony Computer En|
CDROM: read sector 00:02:04 4
CDROM: read sector 00:02:05 5
CDROM: read sector 00:02:06 6
CDROM: read sector 00:02:07 7
CDROM: read sector 00:02:08 8
CDROM: read sector 00:02:09 9
CDROM: read sector 00:02:10 10
CDROM: read sector 00:02:11 11
CDROM: read sector 00:02:16 16
CDROM: read sector 00:02:18 18
diff --git a/src/psx/cpu.cpp b/src/psx/cpu.cpp
index 24300f3..5a51afd 100644
--- a/src/psx/cpu.cpp
+++ b/src/psx/cpu.cpp
@@ -458,6 +458,55 @@ uint32 PS_CPU::Exception(uint32 code, uint32 PC, const uint32 NPM)
#define GPR_RES(n) { unsigned tn = (n); ReadAbsorb[tn] = 0; }
#define GPR_DEPRES_END ReadAbsorb[0] = back; }
+ uint32 PS_CPU::cache_fetch(pscpu_timestamp_t &timestamp, uint32 PC) {
+ uint32 instr;
/* Invalidate the cache */
jal bios_flush_cache
nop
/* Jump to cache_test, mid cacheline */
jal cache_test
nop
la $t0, cache_test
li $t1, 0x8c000003
.set mips1
.set noreorder
.text
.global main
.type main, function
.EQU TIMER0_BASE, 0x1f801100
.EQU TIMER1_BASE, 0x1f801110