Recorded regex that was used for Signal Tap to MAME comparison

This commit is contained in:
Adam Gastineau
2023-06-27 12:43:09 -07:00
parent 0446c3495a
commit db98aa8161

View File

@@ -56,4 +56,39 @@ Building (my environment, MSYS2 MinGW Windows)
```
export MINGW64=/mingw64 MINGW32=
make SUBTARGET=gnw SOURCES=src/mame/handheld/hh_sm510.cpp -j8 ARCHOPTS="-fuse-ld=lld"
```
----
Not actually MAME, but for building similar to MAME output logs from Signal Tap, I used the following expressions:
```
0 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|reset
1 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|last_pc[11..0]
2 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|instructions:inst|instructions.Acc[3..0]
3 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|instructions:inst|instructions.carry
4 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|instructions:inst|instructions.Bm[2..0]
5 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|instructions:inst|instructions.Bl[3..0]
6 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|instructions:inst|instructions.shifter_w[7..0]
7 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|divider:div|gamma
8 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|divider:div|divider[14..0]
9 = core_top:ic|gameandwatch:gameandwatch|input_config:input_config|input_k[3..0]
10 = core_top:ic|gameandwatch:gameandwatch|sm510:sm510|stage.STAGE_LOAD_PC
```
Replace with empty string:
```
^([0-9]+\s* 0 )
(.*[0-9] 0\s*)$\n
h
( [0-9] [0-9]\s*)$
```
Replacement listed:
```
^(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*) to pc=$1, acc=$3, carry=$4, bm=$5, bl=$6, ram=$7, shifter_w=$8, gamma=$9, div=$10
^(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*?)\s(.*) to pc=$1, acc=$2, carry=$3, bm=$4, bl=$5, shifter_w=$6, k=$9, gamma=$7, div=$8
```