Author Topic: SuperH emulator  (Read 16264 times)

0 Members and 1 Guest are viewing this topic.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
SuperH emulator
« on: April 24, 2011, 04:39:36 pm »
A little internet research turned up this gem of a program. I'm not sure what its capabilities are or exactly what CPU it emulates, but it's still almost certainly useful. Enjoy  :)

http://www.lauterbach.com/cgi-bin/download.pl?file=simsh.zip
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: SuperH emulator
« Reply #1 on: April 25, 2011, 09:38:50 am »
Will this actually work as a PRIZM Emulator? Or not really?

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: SuperH emulator
« Reply #2 on: April 25, 2011, 09:49:08 am »
Will this actually work as a PRIZM Emulator? Or not really?
Not really, but maybe someone can expand it to make it work as one. Currently it seems like it only emulates the CPU and nothing else.

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: SuperH emulator
« Reply #3 on: April 25, 2011, 01:03:10 pm »
This won't work as a Prizm emulator in the least. It's just a way of simulating the CPU that happens to be immensely useful for testing programs that would otherwise be difficult to test.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: SuperH emulator
« Reply #4 on: April 26, 2011, 01:44:31 am »
Just as an emulator of the cpu it is very simple and I almost have all of the cpu up in my emulator. The more complex part of it are all of the nice debugging features in which I did plan on adding. The more complex part of any emulator are the peripherals which need to function just like the originals. 

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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SuperH emulator
« Reply #5 on: May 12, 2011, 05:43:31 pm »
THis is interesting. Hopefully this could make the development of an actual emulator much easier.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: SuperH emulator
« Reply #6 on: May 13, 2011, 02:11:21 am »
I found that my current code for the core emulation is faster because I now have inline asm than that emulator, but it does provide extremely valuable code for the hardware and memory which is 80% of the emulator.

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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SuperH emulator
« Reply #7 on: May 23, 2011, 12:10:39 am »
That's cool to hear. Hopefully maybe we could manage to have an emulator that isn't too much resource-demanding, especially when emulating the calc in 116 MHz mode.

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: SuperH emulator
« Reply #8 on: July 12, 2011, 05:57:39 pm »
Okay, the Trace32 simulator I linked in the first post works. Here's how you can load files:

Take your .bin files from assembly/compilation and change the extension to .hex. After you do that, open up the simulator and hit File>Load. This will bring up a file dialog that will allow you to open up your file. Then, do View>List Source and View>Registers. Change PC to 0 and your binaries should be loaded into the source window. You can then step through them as you wish.

EDIT: Okay, I've been trying to track down a bug that I thought was in Khavi for about 4 hours now. Turns out, the simulator itself is pretty bugged and Khavi is fine. The simulator doesn't handle indirect moves very well. For example, the following code won't work:

Code: [Select]
mov.l @(0x01,PC),r1
rts
.long 0xDEADBEEF

The simulator will place 0x01 into register r1, not the value 0xDEADBEEF.

*Edit* Removed duplicate paragraph
« Last Edit: July 13, 2011, 06:00:00 am by Art_of_camelot »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ