Golden Sun Hacking Community
June 23, 2017, 12:01:16 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
  Home Forum DC Wiki Help Search Calendar Downloads Login Register  
  Show Topics
Pages: [1] 2 3 ... 8
1  The Editor / Golden Sun: The Lost Age Editor / Questions about Space Manager on: June 20, 2017, 11:39:05 AM
I went through the space manager code... and I get that it is mostly a simple thing with a lot of code... but a small portion of it confuses me.

For those who don't know, here are details of the space manager functions.
Quote
#pragma once
#import "includes.h"

class spacemanager
{
public:
     static int list_num;
     static int organizeList(int *list);
     static int mapSpace(int *list);
     static int findSpace(int *list, int size);
     static int confirmSpace(int *list, int index, int size);
     static int freeSpace(int *list, int pos, int size);
     static int claimSpace( int *list, int pos, int size);
};
list_num is the total number of entries in Atrius's free space table.
orgaizeList - pretty self-explanatory, but is where my question(s) are.
mapSpace will either load the free space table, or if there isn't one, scan for free space. (Based on MFT pointers that point before MFT address. And after those, will scan from end of ROM.) It scan backwards, though, so once there is a non-zero, the space for that section is known. (32-bit aligned size.)
findSpace is simple, looks for the first entry in the free space list that has enough size that is needed.
confirmSpace checks if the entire section has 00s or not. (Depending on a flag) (It may also check if the freeSpace being used is all in freeSpace, but that's probably pointless with the findSpace function.) - It is obvious that this helps reduce overwritting any hex editor related edits... but otherwise is not required to have.
freeSpace literally adds another entry of freeSpace. (Checks each of the freeSpace entries to see whether that space can be added to it, if not, it will be added as a separate entry.)
claimSpace is similar to freeSpace, except that it removes the freeSpace.



My question is with organizeList.
I get that it sorts the list from least to greatest size... but I don't get the next part:
Quote
         if (pos!=i)
          {
               val=list[pos<<1];
               size=list[(pos<<1)+1];
               list[pos<<1]=list[i<<1];
               list[(pos<<1)+1]=list[(i<<1)+1];
               if (val==list[i<<1])
               { list[i<<1]=val|0x40000000; }
               else
               { list[i<<1]=val; }
               list[(i<<1)+1]=size;
          }
          if (list[i<<1]==list[(i-1)<<1])
          {
               list_num--;
               for (ii=i; ii<list_num; ii++)
               {
                    list[ii<<1]=list[(ii+1)<<1];
                    list[(ii<<1)+1]=list[((ii+1)<<1)+1];
               }
               list[list_num<<1]=0; list[(list_num<<1)+1]=0;
               i--;
          }
The bolded sections.... Do those ever happen? And if so how? Otherwise, is it free to remove without problems?
The top section is for switching entries (For the small to large sizes)
The bottom section looks like it removes an entry for when two addresses next to each other match.

And after this code is basically the stuff that frees the old free space table from the ROM and puts the updated free space table back into the ROM.



When doing this for the C# version, I think I'll try to make it a little simpler if I can... by removing confirmSpace, and also that the freeSpace table shouldn't "claim space" for itself. If table is going to be managed outside the ROM data. Maybe.)
2  The Editor / Golden Sun Hacking / Class Type code patch (Idea stage/no patch yet) on: May 08, 2017, 01:11:36 AM
So you know how you can never assign which PCs and which Items give you which class types?

Well, my initial thought a long time ago, was all about changing what the class type variable had in its contents....
However, recently, it has occurred to me there could be a better way.... (With a possible trade-off of pointing to free space.)
Do a separate table! (I mean, the Class Type Chart is used to calculate a class type, so why not do similar with PC/item?)
Imagine having a series of items that give you all the same classes, it would be a waste to make separate classes for each, wouldn't it?

And such a table may make it easier to expand on.... I imagine? (e.g. Like imagine having a certain class only on certain maps... like the Lighthouses and such, because of their elemental influence.... but that could require expanding on what's in the table in some way.)

Anyway, table formatting ideas: *Adds in some edits*

8-bit = Current class type
8-bit = New assigned class type
16-bit = PC (-1 for null)
16-bit = Equipped item (-1 or 0 for null.)
16-bit = Storybook Flag

Current class = new assigned class = 0 for end of list? BUT will need to see about direct class assignments... This could even end up being some type of byte code that says when to do the class type chart, even? With possible support to add a number (even different from +20) to the class type (aka: So it is not a trade off against Atrius's Class Separation Patch. Except where space is concerned.) A lot of that takes thinking, though...  so I'd like to keep it nice and simple and therefore might not go that far... and if added to the editor... and if it uses free space, it may be in the form of an Experimental feature/Use-at-your-own-risk feature. / As in no guarantee that your ROM will still work, especially depending on what happens in future editor versions.)

First entry that changes the class could also exit the list?  (Or something like that... I am not sure about everything, so ideas could be given from the Community... which is kind of the reasson why I am posting this right now instead of when the patch would be made... er.)


This should cover all the things GS1/GS2/GS3 do... except the wolf transformation. (e.g. Class: Wild Animal... unless there's an easy way to include those types as well. .. how your class is determined in that case, is based on the pc data... with the turn durations stuff. (Whether it is non-zero or not.)... and is not limited to just Sveta.)
3  The Editor / Golden Sun: The Lost Age Editor / Golden Sun Magic (Beta) - Forge, Elemental Data, Encounters on: May 04, 2017, 11:54:03 PM
Three notable tables have been included that were not editable in Atrius's editor.
(There are other tables, but they have been left out for now.)

To see those three editors, click on Editors in the tool bar. I chose to load it on the second one... The other two have comboboxes... they slow the loading process a little bit. (If they were "virtual"... like what I did with the Text Editor, it probably wouldn't have been a problem, but oh well... maybe some day.)

Also, if you take a look at the code, I have a table manager == Once the data is viewable, it is also editable. :P (Depending on if the table manager supports whatever is being coded in.)



Oh yeah, almost forgot... This only works for GS2. ... (U) version if not any of the others.

@??? in Forge Editor = Not sure if we knew what it was. But if we did, I forgot.... So yeah.
EDIT: It just dawned on me that it might determine what the dialogue displayed is! If that's the case, then it would be forgotten knowledge that has resurfaced.
4  Golden Sun Hacking Community / Feedback / Fatal error on homepage on: April 25, 2017, 06:04:50 PM
Might as well post this here since it has been there for some time. (And for documentation purposes, I guess. :P)

On the home page of this site, you see:

"Fatal error: Call to undefined function Downloads_GetStarsByPrecent() in /home/content/a/t/r/atriusv/html/forum/Sources/Downloads.php on line 5275"

at the bottom.

It just came to my attention that there is a typo.

Downloads_GetStarsByPrecent()


If you call Downloads_GetStarsByPercent() instead, would it work?


(Do note that precent and percent are both valid words, but percent fits this context.)
5  The Editor / Golden Sun Hacking / Runescape Evolution (WIP hack idea) on: April 14, 2017, 08:48:42 PM
Not going to spend too much time on this idea at the moment, but the basics I have thought about. Things could be too straight-forward and boring?


There are Melee (Attack), Ranged, and Magic... With the combat triangle (Melee is effective against Ranged, Ranged against Magic, Magic against Melee.) Bosses will not have a style-weakness (probably), and might sometimes do typeless damage(?)

I would think about separating it so each style has their own Level number, but I suppose using the same level number could work....

There are many tiers of weapons/equipment... in which you must be at that level or more to wear... 1, 10, 20, 30, 40, 50, 60, 70, 75, 80, 85, 90, 92.... etc.
The higher the tier, the harder it is to obtain (Hopefully)... so level 1 bronze equipment could be a common drop for low tier enemies and such... Where as a level 92 could be a very rare boss drop (from a repeatable boss) that you also have to manipulate in some (rather expensive?) ways to be able to use (Maybe something like the Forge in Yallam? And/or something similar to whatever RS does?), plus, they'd degrade.


--- Er... idea has been cut short for now, but could add more later. - As a small disclaimer, I never said that this was any more than an idea, so whether a hack would eventually be made is unknown, and not likely at /this/ current moment.
6  The Community / Open Discussion / Advent of Code on: December 03, 2016, 03:36:40 PM
So thanks to Luna_blade, we know this started recently... anyone else interested.... ? http://adventofcode.com

Spoiler for My answer (in Python code) to the first part of the Day 1 problem (So don't look until you solve. But the main point is to show that it's short.):
myInput = "R4, R3, L3, L2, L1, R1, L1, R2, R3, L5, L5, R4, L4, R2, R4, L3, R3, L3, R3, R4, R2, L1, R2, L3, L2, L1, R3, R5, L1, L4, R2, L4, R3, R1, R2, L5, R2, L189, R5, L5, R52, R3, L1, R4, R5, R1, R4, L1, L3, R2, L2, L3, R4, R3, L2, L5, R4, R5, L2, R2, L1, L3, R3, L4, R4, R5, L1, L1, R3, L5, L2, R76, R2, R2, L1, L3, R189, L3, L4, L1, L3, R5, R4, L1, R1, L1, L1, R2, L4, R2, L5, L5, L5, R2, L4, L5, R4, R4, R5, L5, R3, L1, L3, L1, L1, L3, L4, R5, L3, R5, R3, R3, L5, L5, R3, R4, L3, R3, R1, R3, R2, R2, L1, R1, L3, L3, L3, L1, R2, L1, R4, R4, L1, L1, R3, R3, R4, R1, L5, L2, R2, R3, R2, L3, R4, L5, R1, R4, R5, R4, L4, R1, L3, R1, R3, L2, L3, R1, L2, R3, L3, L1, L3, R4, L4, L5, R3, R5, R4, R1, L2, R3, R5, L5, L4, L1, L1"

c = [ 0,  0,  0,  0]
d = 0 #Direction facing
for b in myInput.split(", "):
    d += {"L": 1, "R": -1}[b[0]]
    c[d&3] += int(b[1:])

print c #c[0], c[1], c[2], c[3]
print c[0] - c[2] + c[1] - c[3] #Remove the sign.

#Extra:
print d #Difference between L and R turns.

Edit: Replaced if block with dictionary check, and swapped regex with the more simplified.
7  The Community / Creative Works / The Himp Parable on: November 10, 2016, 07:55:47 PM
Himp = Hillary + Trump - A play on The Stanley Parable, which this idea should be about. (No current plans to build the game yet, but we can at least call it a written creative work at the minimum.

When the game starts, the first question asked is probably what gender you are. (Possibly could be based on which bathroom you go through, if not wanting to be direct? But also because it might make it more interesting.)  If you pick male, you're Trump, if you pick female, you are Hillary.

Ending ideas:

If Trump:
1. Trump as President/Hillary not in jail. ...
2. Trump gets Hillary in jail, but then must compete against Bernie Sanders.
3. Trump becomes president, and then gets Hillary in jail...
4. Trump releases his tax returns, then loses to Hillary.. etc.

If Hillary:
(Should be some reference to the emails for one of these...)
1. Hillary apologizes for using wrong servers...
2. She doesn't apologize, and ends up in jail.
3. ...

Alternative routes? (Undecided about how you get these, but I reckon these would be a smaller part of the game than the above.)

If Bernie Sanders:
1. "I do not shake filthy dirty hands." because the black woman coughed on hers. This leads to losing a chance at the election. (A reference to Saturday Night Live.)

If Gary Johnson:


Could probably include the three debates, the questions asked there? ... and a number of response choices.
Not sure, but there could be be a points system that represents potential votes you have. (Therefore making the game a little more dynamic then just chosing between a small number of options.)

If anyone has any ideas of what to add, be my guest.
8  The Editor / Golden Sun: The Lost Age Editor / History and Discussion on Reinvention of the editor on: October 26, 2016, 02:46:41 AM
(Sort of a placeholder topic for now,... since I don't have my materials ready... but can list all the things this should be about anyway.)

To recap on old stuff, interesting flow of events go like this, I assume: (Not necessarily in timeline order, but I can try.)
1 = Atrius fan-game development project = About making a game, and not editing a ROM, but maybe still using materials for it. (I assume that project was cancelled because of #2.)
2 = Atrius GS editor = Edits data in the ROM itself.
3 = His editor became open-sourced, a few people may have modded it, but nothing much happened with it since... And then Atrius quit the editor / gave the forums to Kain.
4 = We have huge documentation on the data.. (Not sure when I started it, but listing it as 4 since the bulk of the work may have been done since then...)
5 = I had plans to make the editor in Java... While I did get Thumb code up, it was pretty much put on hiatus. ( I guess maybe I don't really like Java that much?? D: )
Two topics made in that time was:
-http://forum.goldensunhacking.net/index.php?topic=2311.0 = "Tree" poll
-http://forum.goldensunhacking.net/index.php?topic=2335.0 = "Un-packing" poll
6 = I eventually start doing the Editor in C# with Map Editor as main form. And that editor featured fast decompression/compression of text with char tables re-written (as is supposed to be.) for best compression.
7 = Someone started on Open Golden Sun project, but I can't remember where this falls in the timeline.
8 = I start thinking about "unpacking" the ROM again with the idea of leaving the original ROM alone entirely. (After the unpack.) With a more in-depth idea on how it could possibly work.... (Haven't started it yet, but it really has me thinking the managing a ROM directly has so many weak spots in it... Or um... unnecessarily complications for maximum usage.)

1. = "Unpacking" = Not sure if it should be separates apps, or one app. "Export app" / "Build app" which could be console apps... and separate UI apps that "find labels" in your source code to use the data as necessary... - I could maybe even make it all one app... and then create shortcuts that pass an argument to "immitate" like they're separate apps.??? (Assuming that's possible.)

Thoughts. (Early versions should have less features than this.(?))
Export from ROM stuff:
-Code from a GBA emulator dissembler could be grabbed and modified... One would have to have labels for all functions and branch locations, as well as any data pointers, etc.
-Possibility to one day have files that list what those labels could be is an option, but other-wise unnecessary for a first version. (Could be dummy names like func1, func2, label1, label2, etc.)
-Further conversion/option to export as a C-related code?

FYI: In my opinion, the way I would have it done... It would be unlikely for the program (when done) to take longer than 3 seconds to export everything in a format I'd find desirable. (Most likely a second or less.) - And that's even if 100% of everything is decompressed.

Build:
-Could take code from a compiler that can already compile ASM...
-Possibility to compile both arm/thumb and C-related code?

(More to come?)

--
But yeah, this topic should be for any discussion on anyone's attempt to at least make /some/ progress on such an idea to reinvent the editor any way they want, even if trivial. It will build a history, either way.
9  The Community / Debates / Trump-bait / The Presidential Debate on: October 20, 2016, 03:33:54 AM
Random debate on the U.S. Presidential Debate

-Who won this debate, and why?
-Who do you think will win the election?
-And who would you have voted for?

--
Me:
-I think Hillary probably won it. (If I had to guess the ratings.)
-I think Hillary will probably win it, and that it will probably be a close one. (Even given how dumb they make Trump look on television.
-Probably Nobody... Don't look at me... No no no... no no... But if I ABSOLUTELY had to vote, then my vote sways toward Trump. (Don't kill me.) (Can you really blame me, though, if there are no good options?)

(Keeping it brief so I don't have a huge wall of text.)
10  Golden Sun Games / General Golden Sun / Character swapping in battle on: June 07, 2016, 12:05:12 AM
Now time to discuss a mostly trivial feature that didn't really exist in GS unless you had 5+ PCs. (But you had to swap them with the back party to do so.)
Should it be possible to change the order of PCs in battle? (Even if you have four or less PCs.)
Should it use up a turn, or be freely available to change each round without cost?
Why or why not?
11  The Community / Tech, Gaming and Entertainment / Nintendo NX (codename) on: May 25, 2016, 05:15:19 AM
Anybody have any idea what it is?

List of notable things I found from sources go here:
-It will be released March 2017.
-It’s not merely the successor to the handheld 3DS or stationary console Wii U.
-This will be hardware that’s been made with a new way of thinking. (Basically a redundant line?)
-It will not be shown in this E3's conference.
-There will be a Zelda game released for the Wii U and NX... (I'm guessing the game might be shown at E3.)
12  Golden Sun Hacking Community / Feedback / PM Capacity on: January 19, 2016, 10:42:29 PM
So I notice that this is set to 100 on each user... and that there are no posting limits in the forum topics themself.... So I was wondering if  there was any good reason for a low capacity, and whether it'd be increased or removed altogether. (I prefer removed.)

So... In 7 more messages, my inbox will be full... When it is, I'm thinking about just leaving it that way, and directing people to something like Skype. - I thinking I'm too lazy to actually save/delete the messages each time I get new PMs (Or just simply don't want to.), so I have a feeling if that becomes the only method, it'll probably not work out?
13  The Editor / Golden Sun Hacking / Harry Potter Golden Sun? on: November 26, 2015, 08:22:49 PM
Discuss ideas for how a Harry Potter game would be in the format of Golden Sun.


My ideas:
-Assume that people are born with an element as a priority before they even join a House... so that the House they are in does not decide their element... So I'm currently thinking something like this:
Harry - Venus adept
Ron - Mars adept (Perhaps Garet replacement.)
Hermione - Jupiter adept?
??? - Mercury adept

@Hermione - Was thinking about Mars adept /Jenna replacement.... until I thought about her being the "smart one" in the group.... (She even had something so she could be in two places at one time.... so it does reference time... not to mention the Wind Guardian Leviosa event at the time they learned it.) so not 100% sure or anything...

And no, her hair is not usually that red, I don't think? - Even by its appearance alone, I feel like it's probably dyed or she's using a wig... (In both cases.)

For weapons, there would be a Wand that you can equip... (There might be different tiers of wands, but haven't decided.) - Actually, Harry Potter might be an example of a magic-based game... which means physical attack wouldn't be supported as much?
14  The Community / Forum Games / Word Search on: September 09, 2015, 03:13:17 AM
Just thought of this after thinking about Cipher Codes, so not sure how it will go.

Basically, you hide a word in a block of characters, and someone has to tell you what word you hid.... (Hints could maybe be given if needed... Like category or word length.)


Example:


A B C D E F G H
I J K L M N O P
Q R S T U V W X
Y Z A B C D E F
G H I J K L M N
O P Q R S T U V
E T E H C A M D
E F G H I J K L


Me: So anyone found the missing word?
Garet Hmm... Cool. We wore that back in the day...
Isaac It's Machete!
Me: Correct!
Garet Hey! I had that.
Isaac No you didn't! I said it first.
Garet Aw.


Anyway, time for the first puzzle:

T H G F Y F D A O H
W E Y F C X Z A G Y
P L G G K O V C M A
Q W R I D M K D Y T
I J E Y G V E S Z P
T H N F Y F D A O H
W E Y F C X Z A G Y
P L S G K O V C M A
Q W P I D M K D Y T
I J N Y G V E S Z P

8 letters, Golden Sun related.

Purposefully making it easy right now... No point in doing this if there's no activity, so...
A Word Search generator is recommended, but I did not do that above.
15  The Community / Open Discussion / The New GS Editor Discussion! on: April 01, 2015, 06:24:06 AM
You know how Apple has Siri, and Microsoft has Cortana? Well, this has given me an awesome idea! We need a personal assistant for the Editor!  I think Yoshi will do just fine!



^Concept idea, so Yoshi isn't fine-tuned enough. We're hoping to make him dance (Like right here, he's twirling his booty, preparing for an egg to pop out, ofcourse.), play his sound effects, and do all sorts of stuff.

Happy April Fools!
Spoiler for Hiden:
(I think I just gave the joke away. As if posting in the Open Discussion wasn't enough. :P)
Will probably put April Fools in topic title a bit later.
Pages: [1] 2 3 ... 8
Cbox
Yesterday at 08:57:37 PM
Fox: @conundrum = Think about 8/16/32 bit aligned address, and what that means... Etc.
Yesterday at 08:55:23 PM
Fox: @Space manager thought for gsmagic = What a conundrum... Whelp... I'll just do whatever.... Probably would waste more time thinking about preventing bugs than coding anyway. :P
June 21, 2017, 09:30:34 AM
Fox: Because he quit a long time ago and has other priorities?
June 21, 2017, 08:35:54 AM
javi3: Atrius, por que no sigues con el editor de golden sun?
June 20, 2017, 10:52:48 AM
Fox: It feels like the safest bet is to do Atrius's repointering system, and have something that organizes the tables done a bit separate... er... Well, it's something to think about.
June 20, 2017, 08:53:41 AM
Fox: HOWEVER... I can see other problems that might cause..... (Even with just the pointer in the MFT)  Meh. It's like you actually need a program to apply patches to do it appropriately.
June 20, 2017, 08:46:38 AM
Fox: ... So... What am I thinking? You ask? That the patches the point data after MFT, should have had pointers in the MFT themselves.... In that case, I can see a possibility of everything working smoothly even if space is needed to the very end of the ROM.
June 20, 2017, 08:37:22 AM
Fox: It's basically that everthink from the point of  editing, to the closest free space to the last entry's address would get repointed forward/backwards depending on space needed... and if space is mapped after patches are added, then that could mean the patches are also repointed. (:o)
June 20, 2017, 08:29:03 AM
Fox: Well, I mean if I map the space out the same way Atrius did it.
June 20, 2017, 08:26:41 AM
Fox: I have a hunch... when I add Map Palette editing the way I'm thinking about... it will cause all patches that repoint to after the MFT to break.... Especially if Atrius's editor wasn't used beforehand. Etc.
June 20, 2017, 07:27:17 AM
Fox: Hmmm... Let's see... regardless of method, I think I still do want to take some of Atrius's Space Manager code... Hmm.....
June 20, 2017, 07:07:27 AM
Fox: say*
June 20, 2017, 07:07:19 AM
Fox: I'd go so far as to see.. even if you are trying to be accurate, there could still be inaccuracies... However, that one was just an example where it was clearly intentional.
June 20, 2017, 07:04:03 AM
Fox: Like*
June 20, 2017, 07:03:55 AM
Fox: Let that one time where they tried to clip a guy out... To put it as short and vague as possible.
June 20, 2017, 06:58:52 AM
Fox: But in case you do watch it... I do know the story on TV that they tell... is not always accurate to what actually happened... (From what one can find out from the feed.) ... but usually the fansites will let you know about that.
June 20, 2017, 06:37:54 AM
Fox: Depends, as each person may have a different opinion... (I'm thinking you might find it like other "reality" shows..)  ... I'm not really into Survivor at current.... I also question if it was something about Julie Chen that made it a little more interesting.... .being the an iconic host that she is.. Weird.
June 19, 2017, 11:57:31 PM
Dendrophiliafish_the_skull_licker_xxXXDx101XyeahbabyyeahxxXX: Honest opinion but is it any good or is it just like all other "reality" television?
June 19, 2017, 11:57:00 PM
Dendrophiliafish_the_skull_licker_xxXXDx101XyeahbabyyeahxxXX: I have a friend who is obsessed with that show and Survivor and he wants me to watch with him.
June 19, 2017, 07:47:18 PM
Fox: So.. as soon as I saw the cast of BB19, I wanted to try to pick my favs on first impression... And I'm curious about these: Elena Davies (Female pick, maybe.) and Kevin Schlehuber (Male pick, maybe. - He's the oldest.) ... whether they even get close to the end or not... I have no idea. Would have to watch them play the game.

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.14 seconds with 19 queries.