PDA

View Full Version : What emulators should I write?



kucalc
February 17th, 2007, 20:46
Hello, I'm new here. I'm a programmer for the CASIO fx-9860 graphing calculator. I'm wandering if you can help me out on what emulators should I now write for my graphing calculator. I've recently just finished writing my S/CHIP-8 Emulator: http://www.casiocalc.org/?showtopic=3186

And also Space Invaders: http://www.casiocalc.org/?showtopic=3152

I need help in deciding my next emulator to write. Is there a old system out there that has a resolution of 128x64 or less that I could emulate? Speed won't be a problem as the fx-9860 is currently the fastest graphing calculator just behind by a little, the HP-50g.

hap
February 18th, 2007, 12:40
Do my games, Sokoban and Rush Hour, work on it? Or were you even able to find them? :P ( http://home.planet.nl/~haps/ )

As for another emulator: maybe a 90s HP calculator emulator?

kucalc
February 19th, 2007, 00:50
Yep, your games do work on my emulator. So, is CHIP-8 the only game system that has a resolution of 128x64 or less? I guess then I'll try writing a HP emulator, maybe perhaps the HP-48 series. Where can I get tech docs and specs on these calculators?

hap
February 19th, 2007, 13:03
I don't know of any other straightforward-to-emulate* game systems with a low resolution and monochrome graphics. I don't know much about the HP-48 either :P But I do know the resolution size is low (131*64, you can remove 3 pixels from the border to get around the larger width problem), it's got monochrome graphics, and the potentional userbase is high since you'd be writing it for an audience already interested in calculators.

*: CPU based instead of discrete components, eg. emulating Pong would be a PITA

A good HP calculator site: http://www.hpcalc.org/

Lord Budweiser
February 19th, 2007, 17:44
would gameboy be possible?

Cyberman
February 19th, 2007, 20:08
would gameboy be possible?160x144 (GameBoy) vs 128x64.. no I don't think it would fit too well. :D

Cyb

Toasty
February 19th, 2007, 23:44
Bah! Just use a high-quality scaling filter and it will be beautiful! :P

Cyberman
February 20th, 2007, 00:32
Don't you mean SHRINKing filter? LOL

How about asteroids? That might be somewhat doable. Or perhaps an asteroids type game. Unless you want to emulate a Blood temperature monitoring system I wrote (LOL) it used a 128x64 LCD :D

Cyb

Lord Budweiser
February 20th, 2007, 03:40
A port of tetris would be a good idea... lotta people loves tetris, and it would please quite a ammount of people who uses this calculator.

EDIT: And what about game & watch? would this fit?

Toasty
February 20th, 2007, 06:33
Don't you mean SHRINKing filter?
Scaling can be done up or down, but yeah, that's what I meant (though not seriously). ;)

Cyberman
February 22nd, 2007, 01:38
Scaling can be done up or down, but yeah, that's what I meant (though not seriously). ;)Shrinking and dithering would do it right? I mean it's not greyscaled and what not. ;)

Oh well I think Defender might go well. Or some of the older style Arcade games. Games like BT Tales of the Unknow BT Destiny Knight and BT Thief of fate might be OK also just need some UI tweaky and Variable width fonts.

Cyb

ShizZy
February 22nd, 2007, 02:17
Just skip every-other scanline :O

Toasty
February 22nd, 2007, 05:45
Be quiet ShizZy; you know nothing about teh emulatorz! :P

kucalc
February 25th, 2007, 20:47
A port of tetris would be a good idea... lotta people loves tetris, and it would please quite a ammount of people who uses this calculator.

EDIT: And what about game & watch? would this fit?

Ok, I'll port Tetris.

By the way, what is game and watch?

smcd
February 26th, 2007, 03:21
Game and watch are mildly entertaining LCD games that have small screens and very limited gameplay... http://en.wikipedia.org/wiki/Game_&_Watch

Normmatt
February 27th, 2007, 04:00
theres also the Pocketstation which has a 32x32 screen

Cyberman
February 27th, 2007, 06:57
There use to be a website about the pocket station.

Technical Specs:

CPU : ARM7T (32 bit RISC Processor)
Memory : SRAM 2K bytes & Flash RAM 128K bytes
Graphics : 32 x 32 dot Monochrome LCD
Sound : Mini Speaker (12 bit PCM) x 1 unit
Switches : 5 input buttons + 1 reset button
Infrared : Bi-directional (IrDA based)
LED : 1 indicator
Battery : Lithium battery (CR 2032)
Other functions : Calendar & Identification #
Dimensions : 64 x 42 x 13.5 mm (L x W x H)
Weight : Approx. 30g (w/ battery)
It had several games but all of these came from PS1 games.
It acted like a PS1 flash card to load games. I believe each game was 8k in size (woo huge huh? :D).
I am uncertain how fast it was in speed or it's memory map setup.
The problem might be the fact it's an ARM processor if it was a slow one then there shouldn't be a problem.

Some links
Poket station programs (http://translate.google.com/translate?hl=en&sl=ja&u=http://red.sakura.ne.jp/%7Enobu/error/pk/pk.htm&sa=X&oi=translate&resnum=4&ct=result&prev=/search%3Fq%3DPKEmu%2B%26hl%3Den%26client %3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26hs%3D7SZ)
There are lots of places to download the only EXisting emulator for the pocketstation PKemu. However there are very few sites dedicated to Pocket station developement or emulation.
Lupin's site (http://lupin.shizzle.it/)
Pocket Station Lab from Orion (http://onorisoft.info/ps/ps.htm) this has the most information I've found :D

Cyb

Exophase
February 28th, 2007, 18:21
I'm going to be attempting to reverse engineer the PocketStation (it's for a digital preservation course). I'll keep my results fully public, of course.

Some information I found years ago:

I've seen clock speed listed as either roughly 32KHz and 32MHz. The former is almost definitely not true, the latter is possible (imagine what you could do with it..) Even if it is that fast the games will probably run okay at significantly lower clocks. I'll try to do some tests to roughly determine clock speed.

I heard that the buttons are tied to a unique interrupt.

Obviously there's some kind of real time clock.

I was concerned about the sound, but if it's just streamed 12bit PCM (at a fixed rate perhaps??) it shouldn't be too bad. I wonder if you could make a little module player for it.. you'd have to be very conservative with RAM and you don't have a lot of space (although enough for some decent chiptunes).

I'll probably link here if I get anywhere with this.

Cyberman
March 1st, 2007, 02:15
I'm going to be attempting to reverse engineer the PocketStation (it's for a digital preservation course). I'll keep my results fully public, of course.

Some information I found years ago:

I've seen clock speed listed as either roughly 32KHz and 32MHz. The former is almost definitely not true, the latter is possible (imagine what you could do with it..) Even if it is that fast the games will probably run okay at significantly lower clocks. I'll try to do some tests to roughly determine clock speed.

I heard that the buttons are tied to a unique interrupt.

Obviously there's some kind of real time clock.

I was concerned about the sound, but if it's just streamed 12bit PCM (at a fixed rate perhaps??) it shouldn't be too bad. I wonder if you could make a little module player for it.. you'd have to be very conservative with RAM and you don't have a lot of space (although enough for some decent chiptunes).

I'll probably link here if I get anywhere with this.
I suggest you go to this page (http://onorisoft.info/ps/psinfo.txt) from Orion's site.

It has a map of the setup I believe the speed is some multiple of 32.768khz and it uses a PLL do generate the main clock. Considering it has 2K of internal ram and 128K of flash, the 2K is likely IRAM which is 32bits wide the 128k is likely 16bit wide flash. In all likely hood the 128k can contain several games in it, I'm not sure how many it would or does. The pocket station DOES have a bios though.
Orion's site has some source for a game of his on there. Something to examine at least. If you don't have a real pocket station I suppose it could be rather difficult to to emulate. Anyhow good fortune.

If you make it open source, it might be possible to integrate it into a open source playstation emulator such as PCSX. (that would be rather interesting).

Of note the playstation games can test if a card is pocketstation or not. So there must be some sort of identification method.


ARM Holdings, which reports its maiden full-year results as a public company to the Stock Exchange tomorrow (Tuesday), is celebrating a major design win in the latest add-on for Europe's top-selling games console. Sony's PocketStation, the personal digital assistant peripheral for its PlayStation console, is to incorporate the company's technology.
The PocketStation has been designed around an Atmel single-chip controller based on the ARM7TDMI 32bit risc processor. The single chip incorporates the CPU, flash memory, ram, LCD controller, D/A converter for hi-fi sound and bidirectional IR communications.
The ARM core-based design allows the PocketStation to be used as a memory card to expand PlayStation functionality.
Advertisement Atmel appears to be the original manufacturer of the uC used in the pocketstation it fits with much of there line up at that time.
Cyb

Exophase
March 2nd, 2007, 02:32
Thanks. I have a Pocketstation so at least that part is covered. I didn't realize so much was reversed already. Of course, if documentation is found for that chip in particular that'd be pretty much all of it, right?

Cyberman
March 3rd, 2007, 06:20
There are some obviously missing parts.
One of which is how the playstation recognizes it and stores data too it. Not exactly documented I noticed .. well about anything. They had to have some sort of SDK for the silly thing too. It's kind of crazy. At least they used the CR2032 the most common battery next to a AA alkaline. :D

Now the question is should I split this into another sticky list for people to try as an emulator?

Cyb

aprentice
March 3rd, 2007, 07:26
There are some obviously missing parts.
One of which is how the playstation recognizes it and stores data too it. Not exactly documented I noticed .. well about anything. They had to have some sort of SDK for the silly thing too. It's kind of crazy. At least they used the CR2032 the most common battery next to a AA alkaline. :D

Now the question is should I split this into another sticky list for people to try as an emulator?

Cyb

don't sticky it unless theres is interest showed :P

Normmatt
March 3rd, 2007, 10:56
I have a few documents i managed to salvage from some old sites, too bad they are in japanese

Not too mention the old sdk demo is lost for ever, i wish i was around too back it up when it came out :(

kucalc
March 4th, 2007, 01:55
If you're wandering about the specs of the CASIO fx-9860 graphing calculator:

* Renesas SuperH-3 RISC Big Endian clocked at 40MHz processor (Max CPU speed is about 133MHz. If anyone knows how to program a SuperH processor or knows anything about it please tell me.)
* 1.5MB of built-in flash memory, can be expanded to 1GB with an SD card
* 128x64 high contrast LCD

Again, if anyone has experience with SuperH processors please tell me. If I remember correctly, a SuperH was used in the Sega Dreamcast.

Cyberman
March 4th, 2007, 17:31
If you're wandering about the specs of the CASIO fx-9860 graphing calculator:

* Renesas SuperH-3 RISC Big Endian clocked at 40MHz processor (Max CPU speed is about 133MHz. If anyone knows how to program a SuperH processor or knows anything about it please tell me.)
* 1.5MB of built-in flash memory, can be expanded to 1GB with an SD card
* 128x64 high contrast LCD

Again, if anyone has experience with SuperH processors please tell me. If I remember correctly, a SuperH was used in the Sega Dreamcast.
Well the SH3 was NOT used in the Sega Dreamcast that was an SH4. To be blunt it was a Very BAD idea to do that. Sega would have saved themselves a lot of trouble by using an ARM9 instead.
However to answer your question. The SH3 was originally made by Hitachi semiconductor, which is now Renesas Technology (http://www.renesas.com/homepage.jsp). The SuperH family (http://www.renesas.com/fmwk.jsp?cnt=sh_cpu_child.htm&fp=/products/mpumcu/superh_family/child_folder/&title=Architecture) of microcontrollers goes up and up in performance. There is quite a volume of documentation (http://www.renesas.com/fmwk.jsp?cnt=Documentation.jsp&fp=/products/mpumcu/superh_family/&title=Documentation&lid=2) they have on the various processors available. You should look carefully to see which one matchs most of the specs on the one that is your calculator then grab all the information you can find on it.

Cyb

Exophase
March 5th, 2007, 04:46
There are some obviously missing parts.
One of which is how the playstation recognizes it and stores data too it. Not exactly documented I noticed .. well about anything. They had to have some sort of SDK for the silly thing too. It's kind of crazy. At least they used the CR2032 the most common battery next to a AA alkaline. :D

Now the question is should I split this into another sticky list for people to try as an emulator?

Cyb

Of course Playstations can write to it like a normal mem card, how it detects it/what other communication is possible is another question. Can probably be understood without too much reverse engineering of the PS1 code..

There's an SWI for it, right? Disassembling the BIOS should be a good place for understanding the protocol for communicating with PS1, as well as how the RTC works.

Cyberman
March 5th, 2007, 15:41
Of course Playstations can write to it like a normal mem card, how it detects it/what other communication is possible is another question. Can probably be understood without too much reverse engineering of the PS1 code..

There's an SWI for it, right? Disassembling the BIOS should be a good place for understanding the protocol for communicating with PS1, as well as how the RTC works.The playstation sends packets of data using 128 byte packets. The memcards are what is termed small sectored flash. 128 byte sectors and 8k pages. It is essentially an SPI EEPROM (seriously).

Knowing this you should be able to acertain, you don't need to even touch the bios routines. The bios routines are pretty low level for the memcard. Thus it is likely that you will want to examine a games behavior when it's saving data instead. This is possible using a PS1 emulator with debugging capabilities (pSX).

Cyb

Exophase
March 5th, 2007, 17:51
The playstation sends packets of data using 128 byte packets. The memcards are what is termed small sectored flash. 128 byte sectors and 8k pages. It is essentially an SPI EEPROM (seriously).

Knowing this you should be able to acertain, you don't need to even touch the bios routines. The bios routines are pretty low level for the memcard. Thus it is likely that you will want to examine a games behavior when it's saving data instead. This is possible using a PS1 emulator with debugging capabilities (pSX).

Cyb

What I meant was that as far as the PS1 is concerned, the Pocketstation is identical to any other standard 128KB memory card. It's also entirely possible that it is identified as a Pocketstation by the unique identifiers in the header. I'm not sure how much actual interactive communication back and forth is done between the two devices in games (since I haven't ever used a Pocketstation with a real PS1 running a PS1 game which interfaces with it).

The SWIs in particular I meant were the ones on the Pocketstation's side, not the PS1 side; these would also expose any additional communication protocol between the two (and would be easier to get at than ones on PS1 games).

Cyberman
March 5th, 2007, 22:20
What I meant was that as far as the PS1 is concerned, the Pocketstation is identical to any other standard 128KB memory card. It's also entirely possible that it is identified as a Pocketstation by the unique identifiers in the header. I'm not sure how much actual interactive communication back and forth is done between the two devices in games (since I haven't ever used a Pocketstation with a real PS1 running a PS1 game which interfaces with it).
Hmmm apart from making a PS1 card emulator device for the PC this might be hard. This is kind of a Job for a Parallel port toy or USB device. This gets complicated fast however. I have documentation on the hardware level interface, as well as the PS1 memory card communication protocol etc. Perhaps inserting a Ghost system (one that copies data as it passes to and from the playstation) and dumps it via the USB serial protocol to the PC. That is the only way I can think of to analyze it.


The SWIs in particular I meant were the ones on the Pocketstation's side, not the PS1 side; these would also expose any additional communication protocol between the two (and would be easier to get at than ones on PS1 games).Hmmm... I think that might be more difficult than you believe. If you could hack up a pocketstation PS1 emulator that can allow it to dump the bios via the playstation one interface you might be in business. With a memory map you might be able to for example stuff a bootloader program into RAM and have it dump data to the port it scaned from internal ROM. In either case this requires some hardware creation.
If you wish me to go over the details... hmm this is really a very technical proceedure just warning you ahead of time. It involves the use of CPLD's USB and some firmware writting. Nothing impossible just requires some serious hardware hacking in which the programming forum is not the appropriate place to discuse.

Cyb