Skip to content

Instantly share code, notes, and snippets.

View gist:c820a81d4786002065c3
asm!("j 0xa0\n\t\
nop"
:
: "{a0}"(c)
:
: );
// Gives: rustc: [...]/MipsISelLowering.cpp:3309: std::pair<unsigned int, const llvm::TargetRegisterClass*> llvm::MipsTargetLowering::parseRegForInlineAsmConstraint(llvm::StringRef, llvm::MVT) const:
// Assertion `Prefix == "$"' failed.
View gist:2cca5f1d95e4f1bacb4f
8001020c <_ZN4uart4Uart4putc20hec954448b6b2526apaaE>:
8001020c: 27bdfff8 addiu sp,sp,-8
80010210: afbe0004 sw s8,4(sp)
80010214: 03a0f021 move s8,sp
80010218: 30a400ff andi a0,a1,0xff
8001021c: 2409003c li t1,60
80010220: 08000028 j 800000a0 <main-0xff60>
80010224: 00000000 nop
80010228: 00000000 nop
8001022c: 03c0e821 move sp,s8
View gist:f28c345d70b4116f7a97
.section .text._ZN4uart4Uart4putc20hec954448b6b2526apaaE,"ax",@progbits
.globl _ZN4uart4Uart4putc20hec954448b6b2526apaaE
.align 2
.type _ZN4uart4Uart4putc20hec954448b6b2526apaaE,@function
.set nomicromips
.set nomips16
.ent _ZN4uart4Uart4putc20hec954448b6b2526apaaE
_ZN4uart4Uart4putc20hec954448b6b2526apaaE:
.cfi_startproc
.frame $fp,8,$ra
View gist:438196d7a67bb0d55177
.set noreorder
.set noat
.set mips1
.text
.global main
main:
j foo
View gist:2173c1d097667e2c4c59
.set mips1
.set noreorder
.text
.global main
.type main, function
.EQU TIMER0_BASE, 0x1f801100
.EQU TIMER1_BASE, 0x1f801110
View cacheline_test.s
/* 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
View mednafen-multidispatch.patch
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;
View gist:1fee609669351b8e8f21
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
View gist:557684d19b005e0d6744
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|
View post-bootrom GB CPU registers
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