Author Topic: PRIZM Emu  (Read 37906 times)

0 Members and 1 Guest are viewing this topic.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: PRIZM Emu
« Reply #45 on: February 18, 2011, 03:07:30 pm »
Sounds nice. =) Question though, will this emulator require you to dump your own Prizm's ROM, or will it be able to function just with an OS?
To be a true emulator a rom dump will be required, but it looks like some software will need to be written to do that.

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 Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: PRIZM Emu
« Reply #46 on: February 18, 2011, 08:41:55 pm »
Or if Casio lets you you could reconstruct a ROM from just an OS.

Glad to know someone's taking this on! :D




Offline bsl

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 157
  • Rating: +14/-0
    • View Profile
Re: PRIZM Emu
« Reply #47 on: February 18, 2011, 10:01:40 pm »
Here is a prizm emulator modelling program.
It simply brings up a prizm graphic and responds to key presses - nothing more.
Modeling , is a means of coming up with better ideas or using  features of the model
for the first working prototype.
This program written in Python could easily be converted to a C program using Windows GUI API.

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: PRIZM Emu
« Reply #48 on: February 18, 2011, 11:14:31 pm »
Even the screen shouldn't be too bad once I get the general framework up. In fact I could convert this for a whole bunch of different SH3 calcs. Technically it's even possible to expand this for SH4 proc devices because the SH4 executes all of the SH3 commands in addition to a few new ones of its own. I could even go as far to make my own virtual dream calculators using the Super H architecture.


And what's this. 300 posts!!!!!!!!!!!!!  :w00t: :w00t: :hyper: :hyper: :evillaugh: :evillaugh:

Edit: Super Member, I like that title :)
Something I hope, though, is that the LCD driver isn't like 10 times slower than the 83+. On the 83+ problems arise when the LCD delay is too low and grayscale needs to be interlaced to look good.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: PRIZM Emu
« Reply #49 on: February 19, 2011, 02:46:09 am »
Alright the Prizm emulator is coming along quite well. So far it has support for 18 commonly used instructions with all of them in longword format. These instructions are most of the MOV instructions, Add and subtract, comparisons, and branching statements. Tomorrow I will code a simple user interface in to display the contents of each register. I hope to have the first pre-alpha version out either Saturday or Sunday. The code should compile on all systems.

Lastly I was having some trouble trying to emulate the NOP instruction. Help would be much appreciated because it is way to complex for my puny brain.

[j/k]  ;)

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: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PRIZM Emu
« Reply #50 on: February 19, 2011, 03:05:45 am »
NOP == Nu-Omnimaga-Pron? O.O

j/k I'm glad to hear it's progressing well. Did you have any difficulty getting around the whole virtual memory thing?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: PRIZM Emu
« Reply #51 on: February 19, 2011, 03:34:27 am »
NOP == Nu-Omnimaga-Pron? O.O

j/k I'm glad to hear it's progressing well. Did you have any difficulty getting around the whole virtual memory thing?
I haven't tested it for speed yet, but how it works is when the program is started two dynamic arrays are initialized. The first one is an index of pointers. Every pointer in there represents a 64kb section of ram. The second array is the data in ram. An example of this would be for a write to memory. First the part of the emulator that needs to write to memory would call the memory write function with the syntax writememory(int data = 42, int address = 0x00000005);. Then the memory function would take the address 0x00000003 and see that it corresponds to the 0x00000000 page (pages are all 64kb long). The next step would be to then parse the the first array for 0x00000000. If it exists then the memory function writes 42 to the second array with the syntax memorydata [index][offset] =42. Where index is the index in the first array where 0x00000000 was found and offset is the lower word in data. and if 0x00000000 doesn't exist then it is added to the first array and another 64 kb are added to the second array. This might be kind of hard to understand, but I will have better examples later along with the source for review.

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: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PRIZM Emu
« Reply #52 on: February 23, 2011, 04:20:45 am »
Has anyone figured out how to transfer calc files to this emu? I tried dragging them on the screen but it said invalid file type when I tried dragging add-ins and program files, and when I tried setting the emu in receive mode through the linking menu it said not supported in the emu. ???

Is it even possible at all? I liked how most TI emulators allowed such thing. It would be nice to make animated screenshots of games ???
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: PRIZM Emu
« Reply #53 on: February 23, 2011, 09:49:30 pm »
Has anyone figured out how to transfer calc files to this emu? I tried dragging them on the screen but it said invalid file type when I tried dragging add-ins and program files, and when I tried setting the emu in receive mode through the linking menu it said not supported in the emu. ???

Is it even possible at all? I liked how most TI emulators allowed such thing. It would be nice to make animated screenshots of games ???
Yeah you won't be able to do that with Casio's free trial.  :P Their emulator is not a real emulator in that it only emulates the software not the hardware. Meaning you can not add your own files.

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: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PRIZM Emu
« Reply #54 on: February 25, 2011, 07:54:00 pm »
I see... I guess then a new emu is in order. <_<
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: PRIZM Emu
« Reply #55 on: February 26, 2011, 02:30:02 am »
Update:
To convince everyone that i'm not slacking off on this project. I am posting the entire project source as of right now. You will notice first off that you cannot compile the code yet because there is no main function. You can however review the code, which I am trying to keep well commented. The most interesting part is "instruction set.h" as it contains the emulated source for each machine instruction. Right now in the code, 9 of the instructions are fully written. 18 instructions (viewable in the source) will be included with the first release (hopefully this weekend). You will also notice that a file called spectrum.cpp is missing. Spectrum will be the official name of the project when I release it. With the first version a user will be able to upload a pre-compiled program (no header) and run that. There will also be a gui (I will be working on that later), that will display the current contents of the 16 registers and the cpu speed. Lastly there really isn't a whole lot left to code before the first release. Enjoy the source for now.  :D
« Last Edit: February 26, 2011, 02:30:24 am by z80man »

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: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PRIZM Emu
« Reply #56 on: February 26, 2011, 04:17:03 am »
I'm glad this is progressing. Is it me or is the code really small, though? O.O Or is it just because it's in very early stages?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: PRIZM Emu
« Reply #57 on: March 01, 2011, 01:18:58 am »
Update:
Well the pre-alpha of the Prizm emu is finished. The only problem is that I have a pretty bad history with compilers and keep on getting errors that should not occur. Basically the main problem is that my complier, digital mars, does not recognize global variables properly. If someone else wants to help me compile this please PM me.

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: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PRIZM Emu
« Reply #58 on: March 01, 2011, 01:23:24 am »
Ouch, sorry to hear. I hope you can get it resolved soon. What error do you get? You could post logs, maybe, so people can help.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: PRIZM Emu
« Reply #59 on: March 09, 2011, 12:12:29 am »
Alright I am now able to get the pre-alpha compiled to machine code. I just need to debug it before I can release it. The primary issue now is that I'm trying to emulate the SH3 proc which is in big endian mode, but my compiler works in little endian. This has the effect of causing many annoying bugs that can be hard to locate and remove. This isn't preventing me form releasing the first version, but it does slow me down a little.

I'm also now releasing a few details on how the emulator will work. The first version is not meant to emulate the Prizm, but instead only focus on the SH3 for now. This version also runs from the command prompt which displays several stats. Right now it tells you how many instructions are executed per second and the contents of the 16 general purpose registers. As of now the emulator only supports 18 simple instructions. Most of which involve longwords. The reason for doing this was that I wanted to release the emulator in only small steps. That way we could check that everything works perfectly before I move onto the next segment. Release 2 will feature mostly the same instructions, but with support added for bytes, words, and immediate data. For now though I only want to focus on the current 18 instructions which I will list with the release. When the emulator starts it will load the contents of "spectrum.data" into 0x80000000 on the memory. There are 2 bonus instructions to be used as well. One is (end 0xFFFF) which tells the emulator to stop and quit and (pause 0xFFFE) which pauses execution. For now they are included as standard instructions, but will later be implemented outside of the code.

Future releases will include a full gui that will help with hacking and development. In addition to a fully click able Prizm model there will be real time disassembly, display of memory contents, and stack along with numerous other tools. I am also planning on creating an easy to learn scripting language that will allow users to create their own tools to be run alongside the emulator. The scripting language will allow you to create ui objects, access the Prizm memory, access keyboard inputs, and even allow you to create your own variables with control loops and arithmetic.

If you have any questions, suggestions, criticism, or you want to  tell me I'm an idiot  :P I would love to hear from you.

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)