Hey everyone!

I've worked a hard month on this and am proud to present the first release of my gameboy emulator for Casio Prizm, Prizoop. It now runs ~95% of games a full speed (I recommend using frameskip of 1 to get best battery life and consistent smooth performance). Overclocking is necessary to have a fun experience on certain platforming or high reflex games, but not all.

https://www.cemetech.net/programs/index.php?mode=file&id=1569

Plans for the immediate future include:
* Save state support
* Gameboy Color games support (won't be nearly as compatible though)
* Some fancy menu and file footprint stuff (I'm using naive raw bitmaps for the menu UI right now)
* Better auto frame skip (it's sort of trash right now)

Highlights from this project on a technical basis:
* Developed a DMA technique that avoids VRAM entirely and allows >60 Hz refresh rate even when not overclocking. This is very advanced though, needs an ultra small buffer, and may only be useful to just a few devs.
* Overclocking using correct safe bus clocks, etc based on sentaro's code. This is wrapped nicely for easy use in the github.
* Windows simulator code (in the github) that nicely emulates many Prizm OS function calls for easier coding/iteration.
* Completely C based, so there is room for improvement for some handwritten ASM to the core routines and the code is portable.

Congratulations!!
It is very nice that the variations of the game in Prizm increased drastically.
and,I am very grateful to you for good reuse Ptune2 code well. Very Happy

I am anticipating your future development.Laughing
Great achievement! Thanks for your hard work
This should be getting much more praise than it is getting right now, because I understand how difficult and time consuming it is to write an entire emulator. I hope that Nik includes this in April's projects of the month.
Just updating on this...

So far this week I have implemented save states, added a neat little preview image of the game to the options screen so you can see the color palette update in real time, improved and defaulted the frame skip option to AUTO, and moved ROM reading to use Simon's BFile_GetBlockAddress syscall (0x1DAA).

The latter one should allow me to avoid every single OS call while the emulator is running once I cache the results from GetBlockAddress up front rather than use it on demand. Just a straight memcpy and much faster ROM paging times Smile

I'm also gonna add some stuff to disable overclocking entirely on the new fx-CG50 since it's not needed and release a new version with all these changes then.

Oh also on the French forum someone requested I get Pokemon Rouge working so I went ahead and did that Smile
Update is submitted! Highlights:
- Save state support with two in game keys
- Full fx-CG50 / Graph 90+E support
- Direct Ptune2 integration using Sentaro's provided code. Previously was performing the same end result but this is much cleaner. Disables overclock option if Ptune2 settings are active, etc.
- Direct flash reading used cached file block addresses speeds up in game transitions substantially and avoids all OS calls during active game play
- New memory bus controller support (new Gameboy games such as the French Pokemon Rouge used it)
- Improved auto frame skip handling
- Added a neat little image preview in the menu while playing a game so you can actively fiddle with color palette selections
- Integrated bitmap backgrounds into compressed data in the app itself to make the whole emulator a single standalone g3a file.
So many good features- thanks
I appreciate your fantastic works. Very Happy
I am surprised at the source code of the refined Ptune2 direct.
Thanks very much.
Looks really nice! Any chance this will (or does) support sound?
@BQQM180

Yes, I haven't gotten to it yet though. The Prizm doesn't have the best sound support hardware through the link port. This past week I've made some nice performance improvements and am working on Gameboy Color support first before tackling sound.
Thanks for considering future updates too
Nice work. For a few years, I didn't think we would get to see any emulator that runs on the Prizm Smile

On the settings screen, I noticed that both On and Off for the overclock setting are greyed out. Does that mean that another program has set an overclock? I've never overclocked my calc intentionally, but maybe some program did something without asking me... (I'm asking because I would like to make sure that I don't have any overclock enabled.)
Ptune2 if you get it installed separately should be able to tell you if are overclocked or not i think
@JosJuice

amazonka is correct but there is a bug with this on certain models that I discovered over the weekend.

I plan on releasing a *BIG* update soon and this will be covered in that.
Big update is out (once admins approve it)! Here's the big list of improvements:

- FULL Game Boy Color support
- FULL Sound support using a 2.5 to 3.5 mm adaptor. Enabling sound will give you ~10% of a performance hit.
- Huge performance improvements. Most games are fun enough without overclocking, or play at 60 FPS with 2x overclocking on the great majority of games. Some simple original Gameboy games play at full speed with no overclock.
- Much improved screen scaling code thanks to some handwritten assembly code. 150% high quality scaling maintains aspect ratio and smooths the result at a low performance cost.
- Compress ROM files with the included tool and save a lot of on-calc space for a negligible delay in level loading, etc. ROM compression rates vary based on how well packed the original ROM file already was.
- More accurate speed controls. Auto frameskip and speed clamping make most games play within 1% of the correct speed.
Thank you for surprising me yet again. Can you pm me a download link if it does not get approved by tomorrow- that would be the only way of playing Pokemon crystal on a 7-hours trip next morning
Hi tswilliamson,
I'm very impressed by big improvements.Very Happy
Prizoop which appeared of the sound completely became GameBoy.
Thanks very much.


Hi amazonka,
I downloaded from tswilliamson's github. Smile
Thanks, sentari, for github suggestion
This works extremely well even without using the overclock option (and using the overclock option, it's completely smooth).

Just to see how good the sound support was I threw Little Sound DJ at it. Unfortunately, it made the calculator hang. But every other ROM I tried worked extremely well. Congratulations on your very nice work!

If I understand correctly, save states are only 8 KB. Would it be possible to have an option to save to RAM (or perhaps to the OS Main Memory?) to avoid flash wear if saving frequently?
@gbl08ma

I didn't even consider that someone would even try Little Sound DJ Razz I can see if I can figure out why it is hanging, since that may happen on other games. My guess is that ROM is doing some funky stuff with the sound channels. I also believe Pokemon Gold/Silver may not work until I set up real time clock functionality for those cart types, which will actually be neat since the Prizm has an RTC. Very Happy

Save state size will vary based on GBC vs GB roms. I think it is ~17 kb for GB (1kb for misc stuff, 8kb for VRAM, 8kb for work RAM) and ~49 kb for GBC (1kb, 16kb VRAM, 32 kb work RAM). I'm against moving this to a RAM variable for a couple reasons: this is already pretty large for User RAM as it is, and I believe the RAM is backed up to ROM anyway from time to time, so the flash wear wouldn't be mitigated.

If you are worried about flash wear, my suggested use for playing game is this: use the game's existing save function and nothing else. The SRAM on the cart is saved to a ROM file (.sav) *only* when it has changed and you exit out of the game back into the menu. So you can save all you want and it won't have any flash wear until you are done playing. Only use the save states during "emergencies" such as for sanity right before a boss, etc.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement