gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Porting Questions (ARM9 - ARM9)

#33606 - PhoenixSoft - Thu Jan 06, 2005 12:56 am

As you may know, the GP32 has an ARM9 processor (with a changable clock speed up to 166 MHz). The DS also has an ARM9 processor. So my question is, how easy would it be to port GP32 files to the DS (and vice versa)? Would it be a simple matter of writing a program to go through and change memory location references? Or would it require the entire program to be rewritten from scratch? (assuming we're working with assembly here, no fancy C or C++ stuff)

Sorry if these questions are n00bish - I don't have much experience with low level programming :(


Last edited by PhoenixSoft on Thu Jan 06, 2005 1:00 am; edited 1 time in total

#33607 - Wriggler - Thu Jan 06, 2005 1:00 am

Well I don't know much (read: nothing) about GP32 programming. But considering how much of the DS and GBA architecture is done in hardware, I assume you'd need some sort of massive rewrite to get things done. Just look at drawing a sprite:

1. In GP32- Don't know, probably just an array blitted onto a buffer. (Total guess). Anyone?

2. In GBA- Load the bitmaps into a specific spot in memory, set the sprite registers in a certain way, then update the OAM with certain platform-specific information each frame.

Just for sprites, that's one helluva rewrite. I imagine the rest of it would give even more headaches. Of course, if I'm wrong then somebody please point this out! :)

Ben

#33608 - Abcd1234 - Thu Jan 06, 2005 1:06 am

Well, while you're right that the GP32 has a dumb framebuffer for video hardware, the GBA, and thus likely the DS, also support similar bitmapped video modes. Thus, porting the video display code to the DS platform *might* not be that bad.

HOWEVER, the DS definitely doesn't support the 320x240 video mode available on the GP32. Thus, there would definitely be some source-level rewritting to be done, not to mention changes to graphics, etc, etc. IOW, it's not like you could just patch an existing ROM. It really would be more complex than that.

#33609 - PhoenixSoft - Thu Jan 06, 2005 1:10 am

Abcd1234 wrote:
Well, while you're right that the GP32 has a dumb framebuffer for video hardware, the GBA, and thus likely the DS, also support similar bitmapped video modes. Thus, porting the video display code to the DS platform *might* not be that bad.

HOWEVER, the DS definitely doesn't support the 320x240 video mode available on the GP32. Thus, there would definitely be some source-level rewritting to be done, not to mention changes to graphics, etc, etc. IOW, it's not like you could just patch an existing ROM. It really would be more complex than that.


*slaps forehead* I can't believe I forgot about the differences in screen resolution!

But anyway, from what you guys are saying, it does seem like it would be quite a big job to do.

#33611 - dagamer34 - Thu Jan 06, 2005 1:21 am

PhoenixSoft wrote:
Abcd1234 wrote:
Well, while you're right that the GP32 has a dumb framebuffer for video hardware, the GBA, and thus likely the DS, also support similar bitmapped video modes. Thus, porting the video display code to the DS platform *might* not be that bad.

HOWEVER, the DS definitely doesn't support the 320x240 video mode available on the GP32. Thus, there would definitely be some source-level rewritting to be done, not to mention changes to graphics, etc, etc. IOW, it's not like you could just patch an existing ROM. It really would be more complex than that.


*slaps forehead* I can't believe I forgot about the differences in screen resolution!

But anyway, from what you guys are saying, it does seem like it would be quite a big job to do.


Differences in screen resolution? How about the differences in the screens period?
_________________
Little kids and Playstation 2's don't mix. :(

#33615 - PhoenixSoft - Thu Jan 06, 2005 2:06 am

dagamer34 wrote:
Differences in screen resolution? How about the differences in the screens period?

Yeah, but the resolution differences should have been glaringly obvious :(

#33616 - ravuya - Thu Jan 06, 2005 2:07 am

The basic game code could be kept the same. Chances are that GP32 software would directly access the hardware, and as such most of that code would need to be changed (for example, draw operations).

Keep your code modular (separate API from game), and you should be able to adapt and recompile the source easily.

But a direct port with a hex editor? You'd need much more intimate knowledge of both boxes than anyone outside their respective companies has at the moment, and a bad case of insanity.
_________________
Rav (Win/Mac/Linux games for free)

#33618 - dagamer34 - Thu Jan 06, 2005 2:48 am

PhoenixSoft wrote:
dagamer34 wrote:
Differences in screen resolution? How about the differences in the screens period?

Yeah, but the resolution differences should have been glaringly obvious :(


We are going to pretend he didn't know about that and had some case of insanity for overlooking screen ratios.
_________________
Little kids and Playstation 2's don't mix. :(

#33653 - Lupin - Thu Jan 06, 2005 1:35 pm

It would probably be possible to replace specific register writes with jmp instructions that jump to emulator code and replace memory addresses. I am quite sure that this would be possible, but i guess porting a DS game to GP32 would be almost impossible because of 3D hardware.
_________________
Team Pokeme
My blog and PM ASM tutorials

#33702 - PhoenixSoft - Fri Jan 07, 2005 1:55 am

Lupin wrote:
It would probably be possible to replace specific register writes with jmp instructions that jump to emulator code and replace memory addresses. I am quite sure that this would be possible, but i guess porting a DS game to GP32 would be almost impossible because of 3D hardware.


I'm not talking about the full-blown commercial games, just simple homebrew games, and emulators. I was thinking along the lines of porting available GP32 emulators (like for the SNES and Genesis) to the DS.

#33704 - TJ - Fri Jan 07, 2005 2:33 am

PhoenixSoft wrote:
I'm not talking about the full-blown commercial games, just simple homebrew games, and emulators. I was thinking along the lines of porting available GP32 emulators (like for the SNES and Genesis) to the DS.


Obviously

Who the hell would want to play commercial GP32 games in the first place, let alone on any other console?

But at any rate, an emulator would be more complicated than any of the commercial games out there.

#33861 - PhoenixSoft - Mon Jan 10, 2005 3:02 am

TJ wrote:
Who the hell would want to play commercial GP32 games in the first place, let alone on any other console?

Excuse me, Mr. Nintendo Fanboy, but the GP32 does have some good commerical games. Astonishia Story R is a great RPG, and Pinball Dreams is also loved by many.

#33862 - zardozjones - Mon Jan 10, 2005 4:25 am

Any GP32 stuff ported directly to the DS will:

1) Initially be slower - since the most GP32 apps run well above 66mhz

2) Might not work since the DS has 4mb ram and the GP32 has 8mb ram

3) Have problems with screen size - GP32 320x240 DS 256x192

the DS does has pretty wicked tile/texture hardware so emulators (SNES and MegaDrive) could probably be made to run pretty fast - but it would mean alot of hardcore code rewriting to take full advantage of this hardware. For emulators - memory will be a bit of an issue.

#33865 - TJ - Mon Jan 10, 2005 4:57 am

Wow, two games. One of them being a pinball game.

I have owned a GP32 for 2 years, and if somebody handed me a commercial game, I would probably wipe the SMC it was on and put Little John on it.

Anyone who says they bought/have a GP32 to play commercial games is a liar.

#33869 - PhoenixSoft - Mon Jan 10, 2005 5:23 am

TJ wrote:
Anyone who says they bought/have a GP32 to play commercial games is a liar.


Of course you wouldn't want it for the commercial games, but your statement implied that there wasn't a single commercial GP32 game worth playing.