Kodewerx

Our culture has advanced beyond all that you could possibly comprehend with one hundred percent of your brain.
It is currently Sat Aug 02, 2025 12:38 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Discussion of illegal hacking/cracking is prohibited. (No virus/trojans/cracks/warez/etc allowed.)



Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Mon Aug 04, 2008 8:29 pm 
Offline
Kommunist
Kommunist

Joined: Wed Aug 08, 2007 7:32 pm
Posts: 18
Location: Oregon
Firstly, for my purposes this would be for the DS, used mainly to make an in-game music selector, but could be used for any modifier.

Basically, all that would be necessary is to use some button combination to bring up a box with a selector that counts from 1 to whatever the end of the list is, and possibly have the name of whatever that value makes it (for a name or race modifier). However, I've never seen or heard of a code that utilizes any sort of GUI, nor do I know anything about how graphics work yet, so wanted to ask here if it's at all possible.

The two suggestions I've heard so far are to either hijack existing game code and piece it together to make a menu or to create my own simple graphics. The former sounds more feasible, but way more advanced than anything I've come close to doing.

So yeah, is something like this possible in any way, and if so, what would probably be the best method to create a simple menu?


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 04, 2008 10:19 pm 
Offline
Kommunist
Kommunist
User avatar

Joined: Sat Nov 24, 2007 6:04 pm
Posts: 647
Location: Rattlesnakes and Sand
Possible?
Eh, prolly.
Actually, well, yeah, totally possible.


It's also never been done, and would be un-fucking-believably difficult.
A fucking MASSIVE ASM code.

I've actually been looking into this.
So far, with what all I've done, I've realized something quite simple:
This is "possible", but not going to fucking happen. Seriously, NOT GOING TO FUCKING HAPPEN.
I mean, I'm sure Zeld could do this with some serious effort and time.
I don't expect to be able to do it myself, ever, period.

I have looked into a feasible alternative though.
Well, I've been thinking of using the game's existing menus n' such.
Think of it this way:
You have a game, and when you press start, it opens up the stats-screen.
Here you see your Gold, Health, Mana, Name, etc.
Make a code, where, at this point, you can hit, say, select, I guess.
And when you hit 'select':
Your name is stored elsewhere in memory - >
"Lvl 5 Gonzor Sword" is put in it's place, and displayed - >
When you hit 'up', it changes to "Lvl 6 Gonzor Sword", etc. - >
When you've found the weapon in this list you want, you hit 'select' again - >
You're given that particular weapon, and your name is changed back to what it was before - >
All is normal.

Simply using the existing in game menus as menus in order to pick things.
Even turn particular cheats on or off, same as a button combo, but with a 'semi-sorta-almost intuitive kinda-nice GUI'.




But, on your original idea, yeah, don't expect it, seriously.
Damn would I LURV it though..


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2008 12:30 am 
Offline
Kommunist
Kommunist

Joined: Wed Aug 08, 2007 7:32 pm
Posts: 18
Location: Oregon
Well, someone else gave me a suggestion that might be another possible avenue if it'd go how I think.

Basically, if AR can make calls to the DS firmware, then other than figuring out how to do that, the process from there could be simpler, as I'd assume the firmware has some built-in routines for menus. If the AR can actually do that, then homebrew websites will probably be the best aid for this, as those guys should already know the firmware somewhat and how to do coding on the platform, which would be necessary I presume.

Anyway, I'm going to keep looking into it, as if somehow a base template could be coded up, then it'd be a ridiculously good tool on just about every game.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2008 8:05 am 
Offline
Kommunist
Kommunist
User avatar

Joined: Sat Nov 24, 2007 6:04 pm
Posts: 647
Location: Rattlesnakes and Sand
...
You mean the DS Firmware...
Ha, haha.
No.
Absolutely not.

Just so you know, myself, and a few others here, are DS Developers.


What you're talking about there would be possible if the DS Firmware acted as an "Operating System" on the DS, and applications ran on top of it.
BUT.
That's NOT the case.

The DS Firmware IS just an application, with the ability to start other applications.
The only difference between the firmware on the DS, and any other game you've ever put in your DS, is that the firmware is built in.
Simple as that.

Once you're in-game, the firmware isn't running.
It doesn't have to be.

So unfortunately, while actually not a bad idea at all, wouldn't work in this case.
Ever.
Blame Nintendo.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2008 9:45 am 
Offline
Krew (Moderator)
Krew (Moderator)
User avatar

Joined: Tue Apr 01, 2008 5:51 pm
Posts: 384
Title: "Hacker"
The Action Replay can write to the firmware (example: Metroid Prime Hunters Bricking code and the Wifi Unbanner both by Parasyte), if that's what you're asking.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2008 10:50 am 
Offline
Kommunist
Kommunist
User avatar

Joined: Sat Nov 24, 2007 6:04 pm
Posts: 647
Location: Rattlesnakes and Sand
Naw.
What he's wondering is simple (and really a nice idea).
He's wondering if the DS firmware has built in functions for drawing data to the screen (ie Making windows, menus, buttons), and if so, can those functions be accessed by codes.

But, the thing is, DS Games don't run on top of the firmware, they run separate from it. The firmware isn't "used" by games.
The DS firmware does NOT contain drawing functions n' such.
Now, if the DS Firmware were used as an OS on the DS, and did contain drawing functions, codes to access these functions would be totally possible.
But the firmware isn't used as an OS, so they didn't include any of that kind of stuff, so this sort of thing isn't possible.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2008 4:13 pm 
Offline
Komrade
Komrade
User avatar

Joined: Tue Mar 27, 2007 6:23 pm
Posts: 1354
Location: Mario Raceway, 1509.831, 217.198, -564.429
Title: Mario Kart 64 Hacker
Of course, the games themselves probably have graphic functions you could use.

_________________
Image 143
HyperNova Software is now live (but may take a few tries to load) currently down; check out my PSP/DS/Game Boy/Windows/Linux homebrew, ROM hacks, and Gameshark codes!


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2008 4:20 pm 
Offline
Krew (Admin)
Krew (Admin)
User avatar

Joined: Sun Oct 01, 2006 9:46 pm
Posts: 2331
Location: *poof*
Title: The Mad Hacker
That's what I was thinking too but most menus in a game are each completely different... so would there be a creation function? Probably not. ;(

_________________
Image


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2008 5:58 pm 
Offline
Kommunist
Kommunist

Joined: Wed Aug 08, 2007 7:32 pm
Posts: 18
Location: Oregon
Ah, okay, yeah, I did overestimate the firmware. It seems to me that a lot of games use similar menu styles and fonts.

As for how the game would have its own routines and whatnot, I was wondering what the actual coded data of the game would look like. I've assumed it's just in ASM, but some computer-guy was saying it'd most likely be in some easier language like C, then compiled, which makes way more sense. Anyway, my actual question is, what might game code for menus, physics, etc (the stuff running the game) look like?

There were a few times when I was hacking Dawn of Sorrow that I thought I found the programming for weapon behavior, but couldn't decipher much of it, much less augment it in any perceivable way.

With that info, I think I'll probably make my first goals to find the screen buffer (computer-guy said that would be helpful to watch as I change things) and try to find some simple process and make it have a different function (probably damage calculation or MP using things, so I'd just change a couple lines to have the opposite effect).


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 07, 2008 9:28 pm 
Offline
Komrade
Komrade
User avatar

Joined: Tue Mar 27, 2007 6:23 pm
Posts: 1354
Location: Mario Raceway, 1509.831, 217.198, -564.429
Title: Mario Kart 64 Hacker
C and ASM are both compiled to machine code. For an example of a game's C code, look at an open-source game written in C. For an example of machine code, look at a game's memory dump.

_________________
Image 143
HyperNova Software is now live (but may take a few tries to load) currently down; check out my PSP/DS/Game Boy/Windows/Linux homebrew, ROM hacks, and Gameshark codes!


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 08, 2008 9:34 am 
Offline
Kommunist
Kommunist
User avatar

Joined: Sat Nov 24, 2007 6:04 pm
Posts: 647
Location: Rattlesnakes and Sand
Here's something simple.
Code:
/*---------------------------------------------------------------------------------

---------------------------------------------------------------------------------*/
#include <nds.h>

#include <stdio.h>

volatile int frame = 0;

//---------------------------------------------------------------------------------
void Vblank() {
//---------------------------------------------------------------------------------
   frame++;
}
   
//---------------------------------------------------------------------------------
int main(void) {
//---------------------------------------------------------------------------------


   irqInit();
   irqSet(IRQ_VBLANK, Vblank);
   irqEnable(IRQ_VBLANK);
   videoSetMode(0);   //not using the main screen
   videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE);   //sub bg 0 will be used to print text
   vramSetBankC(VRAM_C_SUB_BG);

   SUB_BG0_CR = BG_MAP_BASE(31);
   
   BG_PALETTE_SUB[255] = RGB15(31,31,31);   //by default font will be rendered with color 255
   
   
   consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(31), (u16*)CHAR_BASE_BLOCK_SUB(0), 16);


   iprintf("     Oh hi.\n");

   while(1) {
   
      swiWaitForVBlank();
      
   
   }

   return 0;
}



What does this do?
Attachment:
Screen1.jpg
Screen1.jpg [ 2.3 KiB | Viewed 4837 times ]



That.

That's all.


But what is it in the end?
That is, the binary.
The .nds file, which contains the .bin files the DS runs.
What's in those files?

That is, the ASM, and the Hex code.
Well Hex code is simply a bunch of fucking numbers (Hexadecimal ones) that translate into ASM.
Here's something about ASM though: It's not universal.
ASM on the DS is ARM9 ASM, whereas on your computer, more than likely, it's x86 ASM.
Different shit.

Now, I could post it here, the ASM that made that program.
But I won't.
Because it won't fit.
On this whole fucking page it wouldn't fit.
There's a lot.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 646 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group