Author Topic: Casio Prizm - Kind of hiring patient person  (Read 8250 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Casio Prizm - Kind of hiring patient person
« on: January 15, 2011, 03:54:37 pm »
Hello everyone,

if you are willing to help the PRIZM community;
if you want to be credited in the SH3 Disassembler I'm making;
if you are patient;
if you don't mind spending half an hour, or maybe two halfs, working in something boring...

Then you are the right person!

Code: [Select]
equates = ['Enii','9ndd']

prizmInstructions = ['Mov #imm, Rn','Mov.W @(disp*2+PC),Rn']

I need you to complete those lists (arrays in fact), according to the tables here. Stuff that is less than 4 characters long should be 0009 for example, or 00XX. You will be credited for the disassembler I'm making (which will be released right after someone does this for me).

I've been quite busy and can't do it, but trust me, this is all it takes for finishing a very basic disassembler and it is really easy! It just takes some time.


Note: Make all the instructions and equates in order, and don't include stuff like 'Data Transfer Instructions' and 'System Control Instructions'.

Then PM me or post the lists ;D As you can see, it's python syntax so, in BLEEP BLOOP it should look like:

equates = ['BLEEP','BLOOP','BLEEP','BLOOP','BLEEP]

Thanks Much!
« Last Edit: January 15, 2011, 03:55:05 pm by ScoutDavid »

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #1 on: January 15, 2011, 03:57:40 pm »
I might do this... tomorrow. :P
Sorry, but I really have to sleep right now. If no one else wants do do this, I'll start at around 9 AM GMT or something.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #2 on: January 15, 2011, 04:22:17 pm »
For the record, (and sorry I haven't already told you scout), but we are working on a GUI disassembler, and other stuff in a thing called prizmsuite.

We've already got the google site set up for it, so if you want to host some code there scout, just send me a PM.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #3 on: January 15, 2011, 04:25:53 pm »
For the record, (and sorry I haven't already told you scout), but we are working on a GUI disassembler, and other stuff in a thing called prizmsuite.

We've already got the google site set up for it, so if you want to host some code there scout, just send me a PM.

Hum, Language? Mine is Python (also GUI). But yeah I want to join the team of PrizmSuite. Just need to know the language.

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #4 on: January 15, 2011, 04:30:41 pm »
Code: [Select]
equates, prizmInstructions = zip(*[
('Enii', 'Mov #imm, Rn'),
('9ndd', 'Mov.W @(disp*2+PC),Rn'),
('Dndd', 'MOV.L @(disp*4+PC),Rn'),
('6nm3', 'Mov Rm, Rn'),
('2nm0', 'MOV.B Rm,@Rn'),
('2nm1', 'Mov.W Rm,@Rn'),
('2nm2', 'Mov.L Rm,@Rn'),
('6nm0', 'Mov.B @Rm,Rn'),
('6nm1', 'Mov.W @Rm,Rn'),
('6nm2', 'Mov.L @Rm,Rn'),
('2nm4', 'MOV.B Rm,@-Rn'),
('2nm5', 'MOV.W Rm,@-Rn'),
('2nm6', 'MOV.L Rm,@-Rn'),
('6nm4', 'MOV.B @Rm+,Rn'),
('6nm5', 'MOV.W @Rm+,Rn'),
('6nm6', 'MOV.L @Rm+,Rn'),
('80nd', 'MOV.B R0,@(disp+Rn)'),
('81nd', 'MOV.W R0,@(disp*2+Rn)'),
('1nmd', 'MOV.L Rm,@(disp*4+Rn)'),
('84md', 'MOV.B @(disp+Rm),R0'),
('85md', 'MOV.W @(disp*2+Rm),R0'),
('5nmd', 'MOV.L @(disp*4+Rm),Rn'),
('0nm4', 'MOV.B Rm,@(R0+Rn)'),
('0nm5', 'MOV.W Rm,@(R0+Rn)'),
('0nm6', 'MOV.L Rm,@(R0+Rn)'),
('0nmC', 'MOV.B @(R0+Rm),Rn'),
('0nmD', 'MOV.W @(R0+Rm),Rn'),
('0nmE', 'MOV.L @(R0+Rm),Rn'),
('C0dd', 'MOV.B R0,@(disp+GBR)'),
('C1dd', 'MOV.W R0,@(disp*2+GBR)'),
('C2dd', 'MOV.L R0,@(disp*4+GBR)'),
('C4dd', 'MOV.B @(disp+GBR),R0'),
('C5dd', 'MOV.W @(disp*2+GBR),R0'),
('C6dd', 'MOV.W @(disp*4+GBR),R0'),
('C7dd', 'MOVA @(disp*4+PC),R0'),
('0n29', 'MOVT Rn'),
('0n83', 'PREF @Rn'),
('6nm8', 'SWAP.B Rm,Rn'),
('6nm9', 'SWAP.W Rm,Rn'),
('2nmD', 'XTRCT Rm,Rn'),
('3nmC', 'ADD Rm,Rn'),
('7nii', 'ADD #imm,Rn'),
('3nmE', 'ADDC Rm,Rn'),
('3nmF', 'ADDV Rm,Rn'),
('88ii', 'CMP/EQ #imm,R0'),
('3nm0', 'CMP/EQ Rn,Rm'),
('3nm2', 'CMP/HS Rm,Rn'),
('3nm3', 'CMP/GE Rm,Rn'),
('3nm6', 'CMP/HI Rm,Rn'),
('3nm7', 'CMP/GT Rm,Rn'),
('4n11', 'CMP/PZ Rn'),
('4n15', 'CMP/PL Rn'),
('2nmC', 'CMP/STR Rm,Rn'),
('3nm4', 'DIV1 Rm,Rn'),
('2nm7', 'DIV0S Rm,Rn'),
('001A', 'DIV0U'),
('3nmD', 'DMULS.L Rm,Rn'),
('3nm5', 'DMULU.L Rm,Rn'),
('4n10', 'DT Rn'),
('6nmE', 'EXTS.B Rm,Rn'),
('6nmF', 'EXTS.W Rm,Rn'),
('6nmC', 'EXTU.B Rm,Rn'),
('6nmD', 'EXTU.W Rm,Rn'),
('0nmF', 'MAC.L @Rm+,@Rn+'),
('4nmF', 'MAC.W @Rm+,@Rn+'),
('0nm7', 'MUL.L Rm,Rn'),
('2nmF', 'MULS.W Rm,Rn'),
('2nmE', 'MULU.W Rm,Rn'),
('6nmB', 'NEG Rm,Rn'),
('6nmA', 'NEGC Rm,Rn'),
('3nm8', 'SUB Rm,Rn'),
('3nmA', 'SUBC Rm,Rn'),
('3nmB', 'SUBV Rm,Rn'),
('2nm9', 'AND Rm,Rn'),
('C9ii', 'AND #imm,R0'),
('CDii', 'AND.B #imm,@(R0+GBR)'),
('6nm7', 'NOT Rm,Rn'),
('2nmB', 'OR Rm,Rn'),
('CBii', 'OR #imm,R0'),
('CFii', 'OR.B #imm,@(R0+GBR)'),
('4nm8', 'TAS.B @Rn'),
('2nm8', 'TST Rm,Rn'),
('C8ii', 'TST #imm,R0'),
('CCii', 'TST.B #imm,@(R0+GBR)'),
('2nmA', 'XOR Rm,Rn'),
('CAii', 'XOR #imm,R0'),
('CEii', 'XOR.B #imm,@(R0+GBR)'),
('4n04', 'ROTL Rn'),
('4n05', 'ROTR Rn'),
('4n24', 'ROTCL Rn'),
('4n25', 'ROTCR Rn'),
('4nmC', 'SHAD Rm,Rn'),
('4n20', 'SHAL Rn'),
('4n21', 'SHAR Rn'),
('4nmD', 'SHLD Rm,Rn'),
('4n00', 'SHLL Rn'),
('4n01', 'SHLR Rn'),
('4n08', 'SHLL2 Rn'),
('4n09', 'SHLR2 Rn'),
('4n18', 'SHLL8 Rn'),
('4n19', 'SHLR8 Rn'),
('4n28', 'SHLR8 Rn'),
('4n29', 'SHLR16 Rn'),
('8Bdd', 'BF label'),
('8Fdd', 'BF/S label'),
('89dd', 'BT label'),
('8Ddd', 'BT/S label'),
('Addd', 'BRA label'),
('0n03', 'BRAF Rn'),
('Bddd', 'BSR label'),
('0n03', 'BSRF Rn'),
('4n2B', 'JMP @Rn'),
('4n0B', 'JSR @Rn'),
('000B', 'RTS'),
('0028', 'CLRMAC'),
('0048', 'CLRS'),
('0008', 'CLRT'),
('4m0E', 'LDC Rm,SR'),
('4m1E', 'LDC Rm,GBR'),
('4m2E', 'LDC Rm,VBR'),
('4M3E', 'LDC Rm,SSR'),
('4m4E', 'LDC Rm,SPC'),
('4m8E', 'LDC Rm,R0_BANK'),
('4m9E', 'LDC Rm,R1_BANK'),
('4mAE', 'LDC Rm,R2_BANK'),
('4mBE', 'LDC Rm,R3_BANK'),
('4mCE', 'LDC Rm,R4_BANK'),
('4mDE', 'LDC Rm,R5_BANK'),
('4mEE', 'LDC Rm,R6_BANK'),
('4mFE', 'LDC Rm,R7_BANK'),
('4m07', 'LDC.L @Rm+,SR'),
('4m17', 'LDC.L @Rm+,GBR'),
('4m27', 'LDC.L @Rm+,VBR'),
('4m37', 'LDC.L @Rm+,SSR'),
('4m47', 'LDC.L @Rm+,SPC'),
('4m87', 'LDC.L @Rm+,R0_BANK'),
('4m97', 'LDC.L @Rm+,R1_BANK'),
('4mA7', 'LDC.L @Rm+,R2_BANK'),
('4mB7', 'LDC.L @Rm+,R3_BANK'),
('4mC7', 'LDC.L @Rm+,R4_BANK'),
('4mD7', 'LDC.L @Rm+,R5_BANK'),
('4mE7', 'LDC.L @Rm+,R6_BANK'),
('4mF7', 'LDC.L @Rm+,R7_BANK'),
('4m0A', 'LDS Rm,MACH'),
('4m1A', 'LDS Rm,MACL'),
('4m2A', 'LDS Rm,PR'),
('4m06', 'LDS.L @Rm+,MACH'),
('4m16', 'LDS.L @Rm+,MACL'),
('4m26', 'LDS.L @Rm+,PR'),
('0038', 'LDTLB'),
('0009', 'NOP'),
('0n83', 'PREF @Rn'),
('002B', 'RTE'),
('0058', 'SETS'),
('0018', 'SETT'),
('001B', 'SLEEP'),
('0n02', 'STC SR,Rn'),
('0n12', 'STC GBR,Rn'),
('0n22', 'STC VBR,Rn'),
('0n32', 'STC SSR,Rn'),
('0n42', 'STC SPC,Rn'),
('0n82', 'STC R0_BANK,Rn'),
('0n92', 'STC R1_BANK,Rn'),
('0nA2', 'STC R2_BANK,Rn'),
('0nB2', 'STC R3_BANK,Rn'),
('0nC2', 'STC R4_BANK,Rn'),
('0nD2', 'STC R5_BANK,Rn'),
('0nE2', 'STC R6_BANK,Rn'),
('0nF2', 'STC R7_BANK,Rn'),
('4n03', 'STC.L SR,@-Rn'),
('4n13', 'STC.L GBR,@-Rn'),
('4n23', 'STC.L VBR,@-Rn'),
('4n33', 'STC.L SSR,@-Rn'),
('4n43', 'STC.L SPC,@-Rn'),
('4n83', 'STC.L R0_BANK,@-Rn'),
('4n93', 'STC.L R1_BANK,@-Rn'),
('4nA3', 'STC.L R2_BANK,@-Rn'),
('4nB3', 'STC.L R3_BANK,@-Rn'),
('4nC3', 'STC.L R4_BANK,@-Rn'),
('4nD3', 'STC.L R5_BANK,@-Rn'),
('4nE3', 'STC.L R6_BANK,@-Rn'),
('4nF3', 'STC.L R7_BANK,@-Rn'),
('0n0A', 'STS MACH,Rn'),
('0n1A', 'STS MACL,Rn'),
('0n2A', 'STS PR,Rn'),
('4n02', 'STS.L MACH,@-Rn'),
('4n12', 'STS.L MACL,@-Rn'),
('4n22', 'STS.L PR,@-Rn'),
('C3ii', 'TRAPA #imm'),
])

Yeah, I cheated :p but hey, this is a lot more readable anyway

Edit: when you said in order, did you mean in numerical order or in the order of the original HTML file? numerical order is kind of ambiguous (0008 could go before or after 0n02, depending on n)
« Last Edit: January 15, 2011, 04:36:34 pm by Goplat »
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #5 on: January 15, 2011, 04:32:07 pm »
Golpat, is that a dictionary? If that is python, I am not aware of what that is. Also, I'm very happy that you made it ;D I have to know what that is to use it.

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #6 on: January 15, 2011, 04:36:19 pm »
Golpat, is that a dictionary? If that is python, I am not aware of what that is. Also, I'm very happy that you made it ;D I have to know what that is to use it.

It's just a list of 2-entry tuples. I used zip to turn it inside out and get two large lists.

edit: forgot they're called lists in python, not "arrays"
« Last Edit: January 15, 2011, 04:42:39 pm by Goplat »
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #7 on: January 15, 2011, 10:44:31 pm »
Well, looks like Goplat handled it. Yes, as Graph said, we're he's working on a project called PrizmSuite, which will include a disassembler.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline bsl

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 157
  • Rating: +14/-0
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #8 on: January 15, 2011, 11:40:46 pm »
Here is a command line SH3 disassember in python I wrote in just a little over a day.
It may have a few mistakes, but its a start.
Code: [Select]
c:\> sh3_disass.py Geometry.g3a  7000 7020 > Geometry.S

c:\> type Geometry.S
00007000: MOV.L R14,@-R15
00007002: STS.L PR,@-R15
00007004: ADD $FC,R15
00007006: MOV.L R4,@R15
00007008: MOV.L @($07*4+PC),R3 = 6563D705
0000700A: JSR @R3
0000700C: MOV R5, R14
0000700E: MOV.L @($07*4+PC),R1 = 64F27F04
00007010: MOV $01, R6
00007012: MOV $00, R4
00007014: JSR @R1

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #9 on: January 15, 2011, 11:44:39 pm »
Well, here's the disassembly done by hand for comparison:

Code: [Select]
MOV.L R14,@–R15
STS.L PR,@–R15
ADD $FC,R15
MOV.L R4,@R15
MOV.L @($07*4+PC),R3
JSR @R3
MOV R14, R5

EDIT: Oops. Your disassembler is better than I am  :P

I accidentally got MOV R14, R5 instead of the correct MOV R5, R14

Double Edit: Can you get it to write the output to a text file? It's not very easy to read when it's scrolling.
« Last Edit: January 15, 2011, 11:59:05 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #10 on: January 16, 2011, 01:15:45 am »
I accidentally got MOV R14, R5 instead of the correct MOV R5, R14
Yeah its kind of weird how Renesas put the source and destination registers in different orders for the machine code and the asm code. When I was doing some disassembly I kept on getting the n and m mixed up.

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #11 on: January 16, 2011, 01:16:34 am »
It's pretty easy to do  :P
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio Prizm - Kind of hiring patient person
« Reply #12 on: January 16, 2011, 01:45:59 am »
PrizmSuite seems promising, a disassembler would be cool as well so people can learn assembly for this processor easier.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #13 on: January 16, 2011, 05:31:45 am »
Code: [Select]
equates, prizmInstructions = zip(*[
('Enii', 'Mov #imm, Rn'),
('9ndd', 'Mov.W @(disp*2+PC),Rn'),
('Dndd', 'MOV.L @(disp*4+PC),Rn'),
('6nm3', 'Mov Rm, Rn'),
('2nm0', 'MOV.B Rm,@Rn'),
('2nm1', 'Mov.W Rm,@Rn'),
('2nm2', 'Mov.L Rm,@Rn'),
('6nm0', 'Mov.B @Rm,Rn'),
('6nm1', 'Mov.W @Rm,Rn'),
('6nm2', 'Mov.L @Rm,Rn'),
('2nm4', 'MOV.B Rm,@-Rn'),
('2nm5', 'MOV.W Rm,@-Rn'),
('2nm6', 'MOV.L Rm,@-Rn'),
('6nm4', 'MOV.B @Rm+,Rn'),
('6nm5', 'MOV.W @Rm+,Rn'),
('6nm6', 'MOV.L @Rm+,Rn'),
('80nd', 'MOV.B R0,@(disp+Rn)'),
('81nd', 'MOV.W R0,@(disp*2+Rn)'),
('1nmd', 'MOV.L Rm,@(disp*4+Rn)'),
('84md', 'MOV.B @(disp+Rm),R0'),
('85md', 'MOV.W @(disp*2+Rm),R0'),
('5nmd', 'MOV.L @(disp*4+Rm),Rn'),
('0nm4', 'MOV.B Rm,@(R0+Rn)'),
('0nm5', 'MOV.W Rm,@(R0+Rn)'),
('0nm6', 'MOV.L Rm,@(R0+Rn)'),
('0nmC', 'MOV.B @(R0+Rm),Rn'),
('0nmD', 'MOV.W @(R0+Rm),Rn'),
('0nmE', 'MOV.L @(R0+Rm),Rn'),
('C0dd', 'MOV.B R0,@(disp+GBR)'),
('C1dd', 'MOV.W R0,@(disp*2+GBR)'),
('C2dd', 'MOV.L R0,@(disp*4+GBR)'),
('C4dd', 'MOV.B @(disp+GBR),R0'),
('C5dd', 'MOV.W @(disp*2+GBR),R0'),
('C6dd', 'MOV.W @(disp*4+GBR),R0'),
('C7dd', 'MOVA @(disp*4+PC),R0'),
('0n29', 'MOVT Rn'),
('0n83', 'PREF @Rn'),
('6nm8', 'SWAP.B Rm,Rn'),
('6nm9', 'SWAP.W Rm,Rn'),
('2nmD', 'XTRCT Rm,Rn'),
('3nmC', 'ADD Rm,Rn'),
('7nii', 'ADD #imm,Rn'),
('3nmE', 'ADDC Rm,Rn'),
('3nmF', 'ADDV Rm,Rn'),
('88ii', 'CMP/EQ #imm,R0'),
('3nm0', 'CMP/EQ Rn,Rm'),
('3nm2', 'CMP/HS Rm,Rn'),
('3nm3', 'CMP/GE Rm,Rn'),
('3nm6', 'CMP/HI Rm,Rn'),
('3nm7', 'CMP/GT Rm,Rn'),
('4n11', 'CMP/PZ Rn'),
('4n15', 'CMP/PL Rn'),
('2nmC', 'CMP/STR Rm,Rn'),
('3nm4', 'DIV1 Rm,Rn'),
('2nm7', 'DIV0S Rm,Rn'),
('001A', 'DIV0U'),
('3nmD', 'DMULS.L Rm,Rn'),
('3nm5', 'DMULU.L Rm,Rn'),
('4n10', 'DT Rn'),
('6nmE', 'EXTS.B Rm,Rn'),
('6nmF', 'EXTS.W Rm,Rn'),
('6nmC', 'EXTU.B Rm,Rn'),
('6nmD', 'EXTU.W Rm,Rn'),
('0nmF', 'MAC.L @Rm+,@Rn+'),
('4nmF', 'MAC.W @Rm+,@Rn+'),
('0nm7', 'MUL.L Rm,Rn'),
('2nmF', 'MULS.W Rm,Rn'),
('2nmE', 'MULU.W Rm,Rn'),
('6nmB', 'NEG Rm,Rn'),
('6nmA', 'NEGC Rm,Rn'),
('3nm8', 'SUB Rm,Rn'),
('3nmA', 'SUBC Rm,Rn'),
('3nmB', 'SUBV Rm,Rn'),
('2nm9', 'AND Rm,Rn'),
('C9ii', 'AND #imm,R0'),
('CDii', 'AND.B #imm,@(R0+GBR)'),
('6nm7', 'NOT Rm,Rn'),
('2nmB', 'OR Rm,Rn'),
('CBii', 'OR #imm,R0'),
('CFii', 'OR.B #imm,@(R0+GBR)'),
('4nm8', 'TAS.B @Rn'),
('2nm8', 'TST Rm,Rn'),
('C8ii', 'TST #imm,R0'),
('CCii', 'TST.B #imm,@(R0+GBR)'),
('2nmA', 'XOR Rm,Rn'),
('CAii', 'XOR #imm,R0'),
('CEii', 'XOR.B #imm,@(R0+GBR)'),
('4n04', 'ROTL Rn'),
('4n05', 'ROTR Rn'),
('4n24', 'ROTCL Rn'),
('4n25', 'ROTCR Rn'),
('4nmC', 'SHAD Rm,Rn'),
('4n20', 'SHAL Rn'),
('4n21', 'SHAR Rn'),
('4nmD', 'SHLD Rm,Rn'),
('4n00', 'SHLL Rn'),
('4n01', 'SHLR Rn'),
('4n08', 'SHLL2 Rn'),
('4n09', 'SHLR2 Rn'),
('4n18', 'SHLL8 Rn'),
('4n19', 'SHLR8 Rn'),
('4n28', 'SHLR8 Rn'),
('4n29', 'SHLR16 Rn'),
('8Bdd', 'BF label'),
('8Fdd', 'BF/S label'),
('89dd', 'BT label'),
('8Ddd', 'BT/S label'),
('Addd', 'BRA label'),
('0n03', 'BRAF Rn'),
('Bddd', 'BSR label'),
('0n03', 'BSRF Rn'),
('4n2B', 'JMP @Rn'),
('4n0B', 'JSR @Rn'),
('000B', 'RTS'),
('0028', 'CLRMAC'),
('0048', 'CLRS'),
('0008', 'CLRT'),
('4m0E', 'LDC Rm,SR'),
('4m1E', 'LDC Rm,GBR'),
('4m2E', 'LDC Rm,VBR'),
('4M3E', 'LDC Rm,SSR'),
('4m4E', 'LDC Rm,SPC'),
('4m8E', 'LDC Rm,R0_BANK'),
('4m9E', 'LDC Rm,R1_BANK'),
('4mAE', 'LDC Rm,R2_BANK'),
('4mBE', 'LDC Rm,R3_BANK'),
('4mCE', 'LDC Rm,R4_BANK'),
('4mDE', 'LDC Rm,R5_BANK'),
('4mEE', 'LDC Rm,R6_BANK'),
('4mFE', 'LDC Rm,R7_BANK'),
('4m07', 'LDC.L @Rm+,SR'),
('4m17', 'LDC.L @Rm+,GBR'),
('4m27', 'LDC.L @Rm+,VBR'),
('4m37', 'LDC.L @Rm+,SSR'),
('4m47', 'LDC.L @Rm+,SPC'),
('4m87', 'LDC.L @Rm+,R0_BANK'),
('4m97', 'LDC.L @Rm+,R1_BANK'),
('4mA7', 'LDC.L @Rm+,R2_BANK'),
('4mB7', 'LDC.L @Rm+,R3_BANK'),
('4mC7', 'LDC.L @Rm+,R4_BANK'),
('4mD7', 'LDC.L @Rm+,R5_BANK'),
('4mE7', 'LDC.L @Rm+,R6_BANK'),
('4mF7', 'LDC.L @Rm+,R7_BANK'),
('4m0A', 'LDS Rm,MACH'),
('4m1A', 'LDS Rm,MACL'),
('4m2A', 'LDS Rm,PR'),
('4m06', 'LDS.L @Rm+,MACH'),
('4m16', 'LDS.L @Rm+,MACL'),
('4m26', 'LDS.L @Rm+,PR'),
('0038', 'LDTLB'),
('0009', 'NOP'),
('0n83', 'PREF @Rn'),
('002B', 'RTE'),
('0058', 'SETS'),
('0018', 'SETT'),
('001B', 'SLEEP'),
('0n02', 'STC SR,Rn'),
('0n12', 'STC GBR,Rn'),
('0n22', 'STC VBR,Rn'),
('0n32', 'STC SSR,Rn'),
('0n42', 'STC SPC,Rn'),
('0n82', 'STC R0_BANK,Rn'),
('0n92', 'STC R1_BANK,Rn'),
('0nA2', 'STC R2_BANK,Rn'),
('0nB2', 'STC R3_BANK,Rn'),
('0nC2', 'STC R4_BANK,Rn'),
('0nD2', 'STC R5_BANK,Rn'),
('0nE2', 'STC R6_BANK,Rn'),
('0nF2', 'STC R7_BANK,Rn'),
('4n03', 'STC.L SR,@-Rn'),
('4n13', 'STC.L GBR,@-Rn'),
('4n23', 'STC.L VBR,@-Rn'),
('4n33', 'STC.L SSR,@-Rn'),
('4n43', 'STC.L SPC,@-Rn'),
('4n83', 'STC.L R0_BANK,@-Rn'),
('4n93', 'STC.L R1_BANK,@-Rn'),
('4nA3', 'STC.L R2_BANK,@-Rn'),
('4nB3', 'STC.L R3_BANK,@-Rn'),
('4nC3', 'STC.L R4_BANK,@-Rn'),
('4nD3', 'STC.L R5_BANK,@-Rn'),
('4nE3', 'STC.L R6_BANK,@-Rn'),
('4nF3', 'STC.L R7_BANK,@-Rn'),
('0n0A', 'STS MACH,Rn'),
('0n1A', 'STS MACL,Rn'),
('0n2A', 'STS PR,Rn'),
('4n02', 'STS.L MACH,@-Rn'),
('4n12', 'STS.L MACL,@-Rn'),
('4n22', 'STS.L PR,@-Rn'),
('C3ii', 'TRAPA #imm'),
])

This piece of code would work if I had to time to search deep into it, so if anyone could do as I initially asked for, OH! That would be a pleasure and I'd release TODAY a GUI disassembler, and right after support for reading .g3a files.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Casio Prizm - Kind of hiring patient person
« Reply #14 on: January 16, 2011, 06:17:38 am »
Code: [Select]
equates = ['Enii','9ndd','Dndd','6nm3','2nm0','2nm1','2nm2','6nm0','6nm1','6nm2','2nm4','2nm5','2nm6','6nm4','6nm5','6nm6','80nd','81nd','1nmd','84md','85md','5nmd','0nm4','0nm5','0nm6','0nmC','0nmD','0nmE','C0dd','C1dd','C2dd','C4dd','C5dd','C6dd','C7dd','0n29','0n83','6nm8','6nm9','2nmD','3nmC','7nii','3nmE','3nmF','88ii','3nm0','3nm2','3nm3','3nm6','3nm7','4n11','4n15','2nmC','3nm4','2nm7','001A','3nmD','3nm5','4n10','6nmE','6nmF','6nmC','6nmD','0nmF','4nmF','0nm7','2nmF','2nmE','6nmB','6nmA','3nm8','3nmA','3nmB','2nm9','C9ii','CDii','6nm7','2nmB','CBii','CFii','4nm8','2nm8','C8ii','CCii','2nmA','CAii','CEii','4n04','4n05','4n24','4n25','4nmC','4n20','4n21','4nmD','4n00','4n01','4n08','4n09','4n18','4n19','4n28','4n29','8Bdd','8Fdd','89dd','8Ddd','Addd','0n03','Bddd','0n03','4n2B','4n0B','000B','0028','0048','0008','4m0E','4m1E','4m2E','4M3E','4m4E','4m8E','4m9E','4mAE','4mBE','4mCE','4mDE','4mEE','4mFE','4m07','4m17','4m27','4m37','4m47','4m87','4m97','4mA7','4mB7','4mC7','4mD7','4mE7','4mF7','4m0A','4m1A','4m2A','4m06','4m16','4m26','0038','0009','0n83','002B','0058','0018','001B','0n02','0n12','0n22','0n32','0n42','0n82','0n92','0nA2','0nB2','0nC2','0nD2','0nE2','0nF2','4n03','4n13','4n23','4n33','4n43','4n83','4n93','4nA3','4nB3','4nC3','4nD3','4nE3','4nF3','0n0A','0n1A','0n2A','4n02','4n12','4n22','C3ii']I might not be able to finish the other half in a while.
Code: [Select]
prizmInstructions = ['Mov #imm, Rn','Mov.W @(disp*2+PC),Rn','MOV.L @(disp*4+PC),Rn','Mov Rm, Rn','MOV.B Rm,@Rn','Mov.W Rm,@Rn','Mov.L Rm,@Rn','Mov.B @Rm,Rn','Mov.W @Rm,Rn','Mov.L @Rm,Rn','MOV.B Rm,@-Rn','MOV.W Rm,@-Rn','MOV.L Rm,@-Rn','MOV.B @Rm+,Rn','MOV.W @Rm+,Rn','MOV.L @Rm+,Rn','MOV.B R0,@(disp+Rn)','MOV.W R0,@(disp*2+Rn)','MOV.L Rm,@(disp*4+Rn)','MOV.B @(disp+Rm),R0','MOV.W @(disp*2+Rm),R0','MOV.L @(disp*4+Rm),Rn','MOV.B Rm,@(R0+Rn)','MOV.W Rm,@(R0+Rn)','MOV.L Rm,@(R0+Rn)','MOV.B @(R0+Rm),Rn','MOV.W @(R0+Rm),Rn','MOV.L @(R0+Rm),Rn','MOV.B R0,@(disp+GBR)','MOV.W R0,@(disp*2+GBR)','MOV.L R0,@(disp*4+GBR)','MOV.B @(disp+GBR),R0','MOV.W @(disp*2+GBR),R0','MOV.W @(disp*4+GBR),R0','MOVA @(disp*4+PC),R0','MOVT Rn','PREF @Rn','SWAP.B Rm,Rn','SWAP.W Rm,Rn','XTRCT Rm,Rn','ADD Rm,Rn','ADD #imm,Rn','ADDC Rm,Rn','ADDV Rm,Rn','CMP/EQ #imm,R0','CMP/EQ Rn,Rm','CMP/HS Rm,Rn','CMP/GE Rm,Rn','CMP/HI Rm,Rn','CMP/GT Rm,Rn','CMP/PZ Rn','CMP/PL Rn','CMP/STR Rm,Rn','DIV1 Rm,Rn','DIV0S Rm,Rn','DIV0U','DMULS.L Rm,Rn','DMULU.L Rm,Rn','DT Rn','EXTS.B Rm,Rn','EXTS.W Rm,Rn','EXTU.B Rm,Rn','EXTU.W Rm,Rn','MAC.L @Rm+,@Rn+','MAC.W @Rm+,@Rn+','MUL.L Rm,Rn','MULS.W Rm,Rn','MULU.W Rm,Rn','NEG Rm,Rn','NEGC Rm,Rn','SUB Rm,Rn','SUBC Rm,Rn','SUBV Rm,Rn','AND Rm,Rn','AND #imm,R0','AND.B #imm,@(R0+GBR)','NOT Rm,Rn','OR Rm,Rn','OR #imm,R0','OR.B #imm,@(R0+GBR)','TAS.B @Rn','TST Rm,Rn','TST #imm,R0','TST.B #imm,@(R0+GBR)','XOR Rm,Rn','XOR #imm,R0','XOR.B #imm,@(R0+GBR)','ROTL Rn','ROTR Rn','ROTCL Rn','ROTCR Rn','SHAD Rm,Rn','SHAL Rn','SHAR Rn','SHLD Rm,Rn','SHLL Rn','SHLR Rn','SHLL2 Rn','SHLR2 Rn','SHLL8 Rn','SHLR8 Rn','SHLR8 Rn','SHLR16 Rn','BF label','BF/S label','BT label','BT/S label','BRA label','BRAF Rn','BSR label','BSRF Rn','JMP @Rn','JSR @Rn','RTS','CLRMAC','CLRS','CLRT','LDC Rm,SR','LDC Rm,GBR','LDC Rm,VBR','LDC Rm,SSR','LDC Rm,SPC','LDC Rm,R0_BANK','LDC Rm,R1_BANK','LDC Rm,R2_BANK','LDC Rm,R3_BANK','LDC Rm,R4_BANK','LDC Rm,R5_BANK','LDC Rm,R6_BANK','LDC Rm,R7_BANK','LDC.L @Rm+,SR','LDC.L @Rm+,GBR','LDC.L @Rm+,VBR','LDC.L @Rm+,SSR','LDC.L @Rm+,SPC','LDC.L @Rm+,R0_BANK','LDC.L @Rm+,R1_BANK','LDC.L @Rm+,R2_BANK','LDC.L @Rm+,R3_BANK','LDC.L @Rm+,R4_BANK','LDC.L @Rm+,R5_BANK','LDC.L @Rm+,R6_BANK','LDC.L @Rm+,R7_BANK','LDS Rm,MACH','LDS Rm,MACL','LDS Rm,PR','LDS.L @Rm+,MACH','LDS.L @Rm+,MACL','LDS.L @Rm+,PR','LDTLB','NOP','PREF @Rn','RTE','SETS','SETT','SLEEP','STC SR,Rn','STC GBR,Rn','STC VBR,Rn','STC SSR,Rn','STC SPC,Rn','STC R0_BANK,Rn','STC R1_BANK,Rn','STC R2_BANK,Rn','STC R3_BANK,Rn','STC R4_BANK,Rn','STC R5_BANK,Rn','STC R6_BANK,Rn','STC R7_BANK,Rn','STC.L SR,@-Rn','STC.L GBR,@-Rn','STC.L VBR,@-Rn','STC.L SSR,@-Rn','STC.L SPC,@-Rn','STC.L R0_BANK,@-Rn','STC.L R1_BANK,@-Rn','STC.L R2_BANK,@-Rn','STC.L R3_BANK,@-Rn','STC.L R4_BANK,@-Rn','STC.L R5_BANK,@-Rn','STC.L R6_BANK,@-Rn','STC.L R7_BANK,@-Rn','STS MACH,Rn','STS MACL,Rn','STS PR,Rn','STS.L MACH,@-Rn','STS.L MACL,@-Rn','STS.L PR,@-Rn','TRAPA #imm']Is this good?
« Last Edit: January 16, 2011, 06:23:38 am by JosJuice »