Omnimaga

Calculator Community => Casio Calculators => Topic started by: Spenceboy98 on March 17, 2012, 12:52:40 pm

Title: Who Wants to Help With a TI83+ Emulator?
Post by: Spenceboy98 on March 17, 2012, 12:52:40 pm
I want to make a TI-83+ emulator for the PRIZM, but I don't know any C language. Who wants to help? I probably won't be doing any programming(since I don't know the language). I can try though. If I can find a good tutorial. ;D
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Nick on March 17, 2012, 01:35:30 pm
So basicly you want someone else to write one for you if i understand it correctly? if someone wants to do this, ge ahead, it would be nice :)
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: DJ Omnimaga on March 17, 2012, 01:51:10 pm
Well sadly things do not really work like that in programming communities, but it's fine if you're just suggesting the emulator idea I guess. Also if you are new to C it might be best to take on smaller, less complicated projects that won't overwhelm you due to lack of experience in C, then later once you gain more experience you can try larger projects.

That said I think it would be nice to have such emulator as it would increase the Prizm audience greatly (due to the large amount of programs available for the 83+). I think z80man was working on one, but he left the community due to lack of time.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Spenceboy98 on March 17, 2012, 02:24:27 pm
Hmmm........ Was there any progress on that emulator? If so, give link to topic.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: DJ Omnimaga on March 17, 2012, 02:35:03 pm
It was never announced in public forums, but he told that he was working on one or would do so. He was also working on a PRIZM emulator for the computer called Walnut (which was announced here if you check the search engine from board index/home page)
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Spenceboy98 on March 17, 2012, 02:55:46 pm
I looked and in his signature, there it says, "Create an emulator of the 83+ for the Prizm (not started)"
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Scipi on March 17, 2012, 09:09:35 pm
Hmm. It might be better to make a z80 emulator for the Prizm instead that uses the same constants, bcalls, and such as the TI83/84. That way you could technically have Axe for the Prizm and ASM projects would also be able to work on the Prizm as well without having to emulate the entire calculator with redundant functions already provided by the Prizm.

(Of course, there might be problems with perhaps the color screen, but that's why it's an emulator and the emulation software can take care of that) ;)
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: DrDnar on March 18, 2012, 12:24:25 am
Hmm. It might be better to make a z80 emulator for the Prizm instead that uses the same constants, bcalls, and such as the TI83/84. That way you could technically have Axe for the Prizm and ASM projects would also be able to work on the Prizm as well without having to emulate the entire calculator with redundant functions already provided by the Prizm.
I'm not sure why you think that. If your emulator is accurate enough to run assembly programs and apps, it will be accurate enough to run the regular OS.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Scipi on March 18, 2012, 12:33:36 am
I'm thinking space-wise it'd be kinda redundant to have a full emulator, unless it was an optional version or add-on. Not that it wouldn't be accurate enough, but it'd be kinda pointless to have a full emulator, besides perhaps, novelty.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: willrandship on March 18, 2012, 01:03:24 am
Well, for one thing a full emulator would run Asm games, not just Axe ones. Also, Axe stuff would need to be recompiled, as well, with a rewritten parser. Just assigning certain variables and recreating bcalls doesn't even come close. (for one thing, I'm fairly certain axe uses almost NO bcalls whatsoever)
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: JosJuice on March 18, 2012, 03:23:17 am
I'm thinking space-wise it'd be kinda redundant to have a full emulator, unless it was an optional version or add-on. Not that it wouldn't be accurate enough, but it'd be kinda pointless to have a full emulator, besides perhaps, novelty.
When you create an emulator that can run Asm programs for the 8x calcs, you're always going to get the ability to emulate the entire OS as well. Many programs even require that the OS is present.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: DJ Omnimaga on March 18, 2012, 04:01:37 am
You want to emulate the processor and calc hardware, not specific calc softwares. Otherwise what do you do when new softwares come out? (like a major Axe/DCS upgrade)

Also a concern I had: Since the PRIZM linking protocol is different from TI's, would this hinder the possibility of allowing linking in a TI-8x emulator for the PRIZM?
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: jnesselr on March 18, 2012, 12:57:22 pm
We do not have enough information about the prizm to do full emulation of all the ports, and sh3 and z80 are most definitely different beasts.  This would be difficult to say the least.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Spenceboy98 on March 18, 2012, 02:05:45 pm
We do not have enough information about the prizm to do full emulation of all the ports, and sh3 and z80 are most definitely different beasts.  This would be difficult to say the least.

It would be difficult, but it would also be awesome. :D
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: jnesselr on March 18, 2012, 07:25:44 pm
We do not have enough information about the prizm to do full emulation of all the ports, and sh3 and z80 are most definitely different beasts.  This would be difficult to say the least.

It would be difficult, but it would also be awesome. :D
True, but just saying something like "I can't, but who wants to work with me on it" is usually a terrible idea, and usually doesn't go over well.  If you learn C to a high degree, and know how the 83+ works to a high degree, I wouldn't mind it.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: DJ Omnimaga on March 18, 2012, 10:27:39 pm
Although anyone is free to take on the idea if they have enough experience and are willing to do it without too much pressure. :) But seeing as nobody has started doing it yet despite being a great idea, I assume everyone is already too busy with their projects or there's just not enough discoveries about the PRIZM yet, or people are not yet experienced enough in PRIZM development to achieve something like an emulator.

Also another worry I got is about grayscale: The PRIZM screen only allows a maximum of 21 frames per second (22 on some calcs IIRC). A 83+ emulator would absolutely need stuff like Wabbitemu LCD settings so the user can alter how the screen gets refreshed, in order to accomodate grayscale games that flickers a bit more than others (such as Axe and TI-BASIC games). At 21 FPS maximum this might cause a few problems getting perfect-looking grayscale, right?
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: zeldaking on March 18, 2012, 11:03:54 pm
To say the least this would be very difficult. You would need to know Prizm C flawlessly, probably have great understanding in z80 and have plenty of time. I am afraid there is very limited people able to fit those requirements, and I am not one of them. Keep you hopes up and possibly this will be made sometime or another.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Xeda112358 on March 18, 2012, 11:12:59 pm
If somebody links me to some assembly info for the Prizm, I would not mind attempting to write an emulator. I wrote an emulator for a made up system on my TI-84+ a while back, and in assembly, the only difficult things would be hardware emulation, including the keymap, LCD, timers, and linkport. I do have enough knowledge of the z80, I believe, to write an emulator.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: DJ Omnimaga on March 19, 2012, 12:36:27 am
Well if you attempt it, then  good luck. :)
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: JosJuice on March 19, 2012, 02:54:23 am
If somebody links me to some assembly info for the Prizm, I would not mind attempting to write an emulator. I wrote an emulator for a made up system on my TI-84+ a while back, and in assembly, the only difficult things would be hardware emulation, including the keymap, LCD, timers, and linkport. I do have enough knowledge of the z80, I believe, to write an emulator.
Here's the SH3 instruction set:
http://documentation.renesas.com/doc/products/mpumcu/rej09b0317_sh_3sm.pdf (http://documentation.renesas.com/doc/products/mpumcu/rej09b0317_sh_3sm.pdf)
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Xeda112358 on March 19, 2012, 07:13:03 am
Thanks, JosJuice :) Now I will have something else to distract me XD
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: alberthrocks on March 19, 2012, 08:58:15 am
You could try porting the Wabbitemu core, but you'd probably get 1 fps from it since it's very unoptimized. :P A full SH3 ASM port is probably necessary...
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: willrandship on March 25, 2012, 05:57:14 pm
Well, with CPU emulators it's best to write one specifically for the CPU you're using, in Asm. That way, commands can be directly linked, like how AND functions virtually identically across instruction sets. In C, doing an AND command is much more than the single operation.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Xeda112358 on March 25, 2012, 06:36:00 pm
Well, with CPU emulators it's best to write one specifically for the CPU you're using, in Asm. That way, commands can be directly linked, like how AND functions virtually identically across instruction sets. In C, doing an AND command is much more than the single operation.
Yes, exactly. Emulating a CPU in assembly is a cakewalk because of that. The z80 is a very simple cpu that has structures that exist on almost all other newer CPUs. For example, loads, bit operations, and addition/subtraction are available on almost all CPUs and that is the brunt of the operations available on a z80. Emulating the hardware is the tough part, especially the link port (which is a little different on the Prizm, but this may be possible), the LCD, timers, and USB (which I probably won't even attempt). I hope to have enough time for this in the summer (but then again, I hope to be doing GSoC which will eat up a lot of my time).
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: calc84maniac on March 25, 2012, 11:06:27 pm
The hard part about emulating other CPUs on the SuperH is that there is only one flag that can be affected by various operations. For addition/subtraction, that means you'll have to detect carry, overflow, sign, zero flags separately, plus the odd half-carry flag that's already a pain to emulate on most architectures.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: ralphdspam on March 26, 2012, 01:38:25 am
The hard part about emulating other CPUs on the SuperH is that there is only one flag that can be affected by various operations. For addition/subtraction, that means you'll have to detect carry, overflow, sign, zero flags separately, plus the odd half-carry flag that's already a pain to emulate on most architectures.
It would probably be faster to only calculate the half-carry, 3FLAG, and 5FLAG if the emulator hits a PUSH or DAA.  All you have to do is save the operands and flags for one flag-affecting calculation back.

When the emulator hits a PUSH or DAA instruction, the emulator can calculate the flags using the saved operands.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: calc84maniac on March 26, 2012, 11:37:20 pm
3FLAG and 5FLAG aren't necessary at all (other than holding values after POP AF), because newer calculators just set those to 0 upon flag-setting instructions. As for the half-carry, I'm pretty sure that I've used DAA after something other than an addition/subtraction before, and it would be more of a pain to keep track of these operands than to just calculate and save the flag.
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Xeda112358 on March 28, 2012, 07:41:57 am
Good point >.> The half carry will be fun to work through XD
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: willrandship on March 28, 2012, 10:29:20 pm
Does the SH3 have more registers than the z80? If so, maybe you could use some of them as flag substitutes :P
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: Xeda112358 on March 29, 2012, 06:21:16 am
As a quote from the link JosJuice provided:
Quote
• Sixteen 32-bit general registers (eight banked registers)
• Five 32-bit control registers
• Four 32-bit system registers (SH-3)
• Six 32-bit system registers (SH-3E)
There are a few :) I am not sure what permissions are like on certain registers, though :? (I probably have easy access to the sixteen and the others might be more difficult). Also, I really like this instruction set o.o
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: DJ Omnimaga on April 01, 2012, 02:41:30 pm
Also aren't PRIZM registers accessed via some sort of virtual RAM or something like that, not directly?
Title: Re: Who Wants to Help With a TI83+ Emulator?
Post by: calc84maniac on April 01, 2012, 02:45:20 pm
Those are the registers that aren't internal to the CPU, like the RTC, the keyboard, the overclocking stuff, etc.