Any NGPC fans here own a GP2X?

Flavor

Saver,
Joined
Jan 2, 2002
Posts
283
If so, I'm working on a NGPC emulator, and I thought you might like to test it.
 

sliceypete

Astra Superstar
15 Year Member
Joined
Jul 22, 2005
Posts
658
i dont have one but man id get one if you make a good ngpc emulator. the one on the psp blows balls lol.
 

Flavor

Saver,
Joined
Jan 2, 2002
Posts
283
sliceypete said:
i dont have one but man id get one if you make a good ngpc emulator. the one on the psp blows balls lol.

Well, I think it's full speed with sound. It just doesn't have all the little things (like save-game support, file selector, etc.) finished up yet.
 

starman

Armored Scrum Object
Joined
Dec 4, 2005
Posts
264
I don't have a GP32x, but I was wondering on emulation programming in general..
Where would you start to create an emulator? How does the basic coding even work? There isn't too much information on the net (or maybe I haven't looked in the right places).

Since you've obviously made an emulator, pointers on how to get started?
 

Flavor

Saver,
Joined
Jan 2, 2002
Posts
283
starman said:
Since you've obviously made an emulator, pointers on how to get started?

Well, actually, this is based on another emulator, so I can not take credit for it. I didn't start it from scratch, so I can't really claim to know all that goes into it.

I do know, though, from some other projects and this one, that it takes an in-depth knowledge of the hardware. If you wanted to write an emulator, you would want to first study the documents and instruction sets of the main CPU (or CPUs).

To emulate the CPU, you would need to keep track of all the CPU's registers and modify them appropriately for each instruction that you emulate.

For each instruction, you would need to read in the instruction and operands, and then emulate that instruction (properly modifying any registers/memory/etc. that the real hardware would).

Many CPUs have a fixed-size instruction-set, and that makes emulation easier. What I mean is that every opcode is the same size (like maybe 4 bytes). That allows you to read 4 bytes, and then operate, repeat.

The NGPC's instruction set is variable-sized, so it is harder (slower) to emulate. You need to read some (and maybe do some operations), and then figure out how much more you need to read.

For the instructions, you need to first figure out what instruction you are emulating and then probally call a function that would emulate that instruction. You could do this with a switch statement, a jump table, or something else.

Also, to emulate an entire system, you have to also emulate the memory map and any other hardware that might be included. In many systems, if you write to one address, that might be main memory, but another address might be the screen. You have to emulate this behavior also. You could do this by making functions that is responsible for all memory writes and reads and fill them with tests to see what address is being accessed and operate accordingly.

Anyway, this is just the basics from a non-expert. I hope it helps a little.
 

Flavor

Saver,
Joined
Jan 2, 2002
Posts
283
NGF files

If any of you have any .NGF save-game files from your NeoPop "Battery" directory, please PM me.

I want to test some to see if they work on my emu.
 

Diggerman

Sakura's Bank Manager
Joined
Aug 19, 2003
Posts
739
Wow. Full speed with sound?!?!

Are the controls good on GP2X? For playing NGPC games?
 

Diggerman

Sakura's Bank Manager
Joined
Aug 19, 2003
Posts
739
I tried the GP32 version just now, and it's pretty amazing! I don't have a GP2X. But here are a few commenst about the GP32 version of RACE:

1) When scaled, the screen gets split up. I have an old BLU, not a BLU+ or whatever they call the newer ones. I believe there's a way to make it work on either screen type, but I'm not a dev.

2) Speed is OK, certainly good enough to make Card Fighters Clash 100% playable. :) Haven't tried action games yet, but I think they may be kinda slow. I wonder if MOTM works?! :make_fac:

3) A file selector would be awesome, renaming games each time is cumbersome.

Overall it's really nice though, especially for a first release. And man the games look so nice on a backlit screen! Such a shame SNK never did a backlit NGPC. *sigh*

One good thing about the GP32, the controls are very similar to the NGPC. If the speed could be increased then even fighting games should feel pretty close to the real thing.

Keep up the great work, please!
 

Diggerman

Sakura's Bank Manager
Joined
Aug 19, 2003
Posts
739
Now playing MotM - it works! But it's pretty slow. The controls are actually damn good, feel just like a NGPC!

Would turning off sound emulation gain much speed? Because it might be worth it on the GP32. The NGPC has poor sound anyway. It's all about the gameplay, so if it could be 60fps/fskip0 with sound off, that would be a worthy tradeoff IMO.

And how about the ability to overclock? My GP32 can generally run stable at 156Mhz, and in some emus at 166Mhz. Might get a decent speed boost there.

Either way I just hope this project continues on GP32 - the controls are just so much like the NGPC. From what I read the GP2X has a bad control stick in comparison, despite the higher speeds and more RAM.
 
Last edited:

Flavor

Saver,
Joined
Jan 2, 2002
Posts
283
Well, I haven't been doing any of the GP32-specific devel, but I know a fair ammount about it.

Thor (who did the GP32 parts) didn't originally have the sound in it. From what I gather, the addition of sound caused the emulation to slow down by about 3FPS. I don't think that's the increase that you're looking for.

The GP32 and GP2X are fairly similar as far as optimizations go. The emulation is very optimized compared to what it was at the start of the project. In fact, it wasn't long ago that the GP2X version was at the same place the GP32 version is now. The problem is that we've already optimized it since then, so there isn't a lot of general optimizations to do. I think that the next step would be to hand-optimize the CPU core in ARM ASM, and I don't think that's a project that I'm ready to take on. There are still a few general-purpose functions that could be re-written in assembly, and they could give a bit of speed on the GP32.

As for the clock-rate, I think that you're right. It could benefit from a speed-chooser. I think something would have to be built into a file-selector menu. It's possible that Thor is already working on that.

Yeah, the GP2X's stick is pretty poor, but I like the GP2X overall. I have only owned a NLU-GP32, though, so perhaps that's why I think the GP2X is so much nicer.
 

raypfaff

New Challenger
Joined
Feb 10, 2004
Posts
61
I'm in the middle of upgrading a database right now, but if I have time tonight I'll download the GP2X version and tell you how it works with some other roms.
 
Top