90981199 visitors

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - creeperton

Pages: [1] 2 3 4 5 6 ... 14
Wow this is great!  Thank you both!

They deal with files extracted from isos instead of full roms, so it might not be what you're looking for. Some of them might require that you read documentation about the structure of the files.
I have to deal with ISOs on PS1 games, it's perfect.

My programming is lazy, very inefficient most of the time and I know for sure that some stuff is plain wrong (in some of the MXP programs at least), but I think the code is pretty easy to follow and can be used as an introduction to Swing. You might be more interested in getting started with JavaFX though, considering it's becoming the new standard.
We learn Swing in the next class, so that works for me.

I want something to study.

This is mostly for my own interests, but farting around with an open source rom hacking tool will help me in school.

General Discussion / Coupling and orthogonality
« on: February 24, 2015, 02:46:24 am »
Could someone explain how coupling relates to orthogonality in OOP?

I don't actually need the function to accept user input and use that input to generate code that will append the specified element to the end of the specified list.  I was just overachieving and I bit off more than I could chew.  I also thought it would be easier in the long run if I had code I could copy and paste, while changing only the user prompts and the list methods.

I'm trying to make a function that will append an item to a list based on user input.  Python 2.7.8, Windows 7.

Code: [Select]
# Lab 4.1 Create five separate lists.  Each list should have a theme and the
# theme should be reflected in the list name and its elements.  Examples are:
# pets = ['dog', 'cat', 'rat']
# numbers= [34, -1232, 456, 2134]

weather = ['Clear','Rain','Snow','Storm','Windy','Hail','Fog']

locations = ['Park','Forest','Beach','River','Library','Cafe','College',

actions = ['Walk','Examine','Activate','Talk','Wait','Eat','Sleep','Read',

day = ['Morning','Mid-day','Afternoon','Evening','Twilight','Night',
'Late Night','Dawn']

animals = ['fish','Crow','Deer','Seagull','Mosquito','Racoon','Skunk',

# Lab 4.2 Using the lists you defined in 4.1, define functions that
# demonstrate your knowleldge of the list functions: append, extend,
# remove, pop, index, sort, and reverse.  Write at least 2 examples
# using each function.

def listAppend():
    listName = raw_input('You choose to append an item to a list.\nFirst we'
    ' must select a list.\nType the name of one of these lists to see its'
    ' elements:\nweather, locations, actions, day, or animals.\n'
    'Which list do you want to view? ')
# ^get name of list to append an element
    if listName == 'weather':
        for i in weather:
            print i
    elif listName == 'locations':
        for i in locations:
            print i
    elif listName == 'actions':
        for i in actions:
            print i
    elif listName == 'day':
        for i in day:
            print i
    elif listName == 'animals':
        for i in animals:
            print i
# ^print all the elements in the selected list
        print 'There is no list available under that name!'
# ^print if user mistypes name of list
    appendElement = str(raw_input('Please type the element you wish to append to'
    ' the selected list: '))
# ^get the element user wants to append to list
    newList = listName + '.append(\'' + appendElement + '\')'
    print newList

The prompts work fine but the output is:
Code: [Select]
Please type the element you wish to append to the selected list: Sandstorm

What am I doing wrong?

I guess what I want to do is use input to get parts of code and then execute that code.  I know that it's a really stupid idea because that means that users can execute code but still you'd think there would be a way to concatenate string literals and variables that are also strings together and then execute them as code.

Programming / Re: Python libraries for FF7 LZSS compression?
« on: October 24, 2014, 10:27:48 pm »
Holy shit.

Programming / Python libraries for FF7 LZSS compression?
« on: October 23, 2014, 08:00:21 pm »
Taking my first programming language class, using Python 2.7.8.  For my final project I want to make a tool that does the following:
1. Opens a file (BATTLE.ARC),
2. Splits it into 3 parts:
* The parts before a certain point,
* The parts at a certain point (which are actually a compressed file called BATTLE.OUT), and
* The parts after a certain point.
3. Decompresses the second portion of that file (BATTLE.OUT),
4. Patches locations in the BATTLE.OUT,
5. Compresses BATTLE.OUT, and
6. Reassembles BATTLE.ARC from the first part of the file, the second part (compressed BATTLE.OUT), and the third part.

Here's an archived forum post which indicates that FF7 LZSS is different from Haruhiko LZSS.

For later versions of this tool I'd like to load the patches from xml in plain text files, patch a *.bin/cue disc image directly, and make it a GUI tool but I probably can't do that for the due date of the final project so they're on hold.

Site Talk / Re: Submission questions
« on: September 28, 2014, 06:44:59 pm »
How do I update a patch?


I fixed some errors in my Magic Only mod for SaGa Frontier, but I don't see any dialog for removing the old patch and uploading this one.

Gaming Discussion / Re: Vagrant Story Graphics Hack Released.
« on: September 09, 2014, 01:45:23 am »

Newcomer's Board / Re: Need help with Snes/Chrono Trigger hacking
« on: September 08, 2014, 10:07:47 pm »
You're not the first person to come up with this idea!

There are plenty of people who can and probably will help you here before long.

Gaming Discussion / Re: Nice
« on: September 07, 2014, 10:43:55 pm »
I'll miss staring at Ashley's leather man-thong and assless chaps. :'(

Site Talk / Re: Submission questions
« on: September 07, 2014, 10:42:21 pm »
Is it possible to edit the summary/description I made for a patch?  I forgot to include a few I wrote and just threw some crap together before I remembered.

Just try changing the '40' in the bytes I posted with '00'. It may seem strange, but those bytes are really where it loads the instruction from, not the uncompressed data from BATTLE.OUT.

I'm guessing it's part of BATTLE.ARC (took a guess and looked in this file). Hmm, looks like there's compression. Until this is figured out, try to avoid any of the codes that patch memory after 0x180000.
Sorry, don't know. I tend to resort to placing files in a ZIP with no compression and searching through it for the hex, then searching/scrolling up to find the name. Knowing the LBAs of all the files are would probably help.
Bolded portion is brilliant.

Also from what you said it sounds like at least part of battle.out is reproduced in battle.arc - maybe battle.out is redundant.  Wouldn't surprise me, SaGa games are like that.

I have python scripts for dealing with ARC files (one to split them into their subfiles, another to read the starting addresses of each of their subfiles), it's less of an issue than you think.

LBA refers to the starting location of the file in a disc image?

I had issues trying to grab data from the SaGa Frontier 2 disc image because data tables would be split by large chunks of apparently random shit.  Are the chunks of random shit of a standard size?  If they are then I can generate starting addresses of each file in the disc image using a spreadsheet.

I'm sorry I'm asking so many questions!

Compression is standard Haruhiko compression. You can use one of the LZS tools for FF7/FF8.
I'll check at Qhimm, thanks for all your help!

Site Talk / Submission questions
« on: September 05, 2014, 09:39:29 pm »
Does ROM/ISO Information refer to the patched file or the unpatched file?

I don't fully understand what it's doing, but I think I found the data for that specific instruction.

Search for the hex 40 53 42 30.
In the disc image it's found at 0x21b4fb71.  Not sure how that is useful to know.

Tried to save as a binary  but I couldn't get it to work.  Set address to 0x00 and size ot 0x2000000.  Most I can get is a size of 0x200000.  I could make 10 binary dumps and then search through all of them, maybe?  Unless you know of a Windows tool that lets you search through specified binary files or directories for specific bytes?

Saved a disassembly of battle ram from 0x00 to 0x2000000 but it looks like it's too much for Notepad2 to search through.  I'll try find (windows 7 user here).
C:\stuff\>find /n "30425340" battle_disassembly.lst
No hits.
C:\stuff\>find /n "40534230" battle_disassembly.lst
No hits.
C:\stuff\>find /n "40 53 42 30" battle_disassembly.lst
No hits.
C:\stuff\>find /n "30 42 53 40" battle_disassembly.lst
No hits.

Using a write breakpoint, I discovered that it was loading values from the scratch pad. Then I used a write breakpoint on the scratch pad and found various routines, but I needed to narrow it down. I set the breakpoint condition so it would only trigger when the register holding value to write had the exact value of the instruction. I looked at the memory address it had loaded from when building up the value.

I don't know how much changing those bytes will affect though. I think I saw the very next or nearby instructions coming from very far apart memory addresses.

Edit: Here's an example of one of the routines.
Code: [Select]
00070b28: 92a50000 lbu r5,0x0000(r21)
00070b2c: 26d6ffff addiu r22,r22,0xffff
00070b30: 12c000fa beq r22,r0,0x00070f1c
00070b34: 26b50001 addiu r21,r21,0x0001
00070b38: 00121c00 sll r3,r18,0x10
00070b3c: 00031c03 sra r3,r3,0x10
00070b40: 000310c0 sll r2,r3,0x03
00070b44: 00451004 sllv r2,r5,r2
00070b48: 146f0017 bne r3,r15,0x00070ba8
00070b4c: 02629825 or r19,r19,r2
00070b50: ae130000 sw r19,0x0000(r16)
00070b54: 26100004 addiu r16,r16,0x0004
I'm really not sure what I'm looking at.

I loaded all saves from a memory card, and when that didn't work I started a new game.

Thanks to Pyriel of gamehacking.org, for pointing out that the gameshark code only writes to a single byte (the conditional code checks two bytes if they match, and if they do then it executes the next code which overwrites 0x40 with 0x00 at 0x1a665c).

So the routine is originally this:
Code: [Select]
andi r2,r2 0x4000and it becomes this:
Code: [Select]
andi r2,r2 0x0000

I checked endianness by comparing something I know: ability data, in SCUS_942.30 and in RAM.
Code: [Select]
SCUS_942.30 :  9ee0 : 30 00 01 c0 80 14 00
RAM         : 296e0 : 30 00 01 c0 80 14 00
So whatever I see in RAM is exactly the same as anything I'll see in a game file.

Now checking disassembly.
Code: [Select]
RAM         : 1a665c : 00 40 42 30
Disassembly : 1a665c : 30 42 40 00

So anything I see in disassembly is in reverse order, byte by byte, from what I see in memory or in a file.

With this in mind, I'm looking for:
Code: [Select]
00 00 00 00
00 40 42 30
2d 00 40 14
00 00 00 00

Again, the only hit I get on this entire string is at 0x88531f5 in a *.bin disc image.
Trying agin.  Setting 0x88531f5 from 0x40 to 0x00.

Can't take a screencap for some damn reason in Windows 7.  Nonetheless this seems like it should be it.
Still doesn't work.

Decided to replace all occurences of 0x00404230 with 0x00004230, and then use data corruption methods to find the exact location when something actually changes in RAM.  Only 29 hit in the entire disc image, replacing them all now.
It loads.
Nothing seems buggy.
Doesn't work, still displays 0x40 at 0x1a665d.

I located the file in which the routine is found.  It is /MOUT/BATTLE.OUT, at 0x2665d.  The exact same routine (even the routines as far up and down as I can scroll in about 4 seconds, maybe a few dozen lines - they are EXACTLY the same in RAM and in BATTLE.OUT) yet when I edit BATTLE.OUT nothing happens.  Could this be because I'm loading saves from a memory card?

I patched /MOUT/BATTLE.OUT.  Imported the file into sf_testing.bin.  Checked 0x88531f5 in sf_testing.bin.  The change from 0x40 to 0x00 is listed there too and the hex above and below that location are identical to BATTLE.OUT.  Loading it in pSX and starting a new game, we'll see what happens.
Still doesn't show up as changed in RAM.

There is no reason why this shouldn't work, and I'm ****ed if I know.  I'll move on to another code that is within the range of SCUS_942.30 where it's loaded in RAM (I know this because I know where a few data tables from SCUS_942.30 are found in RAM) and unless someone has an explanation for this.  If I encounter the same problems there then I don't know what I'll do, but at least I'll know it isn't something I'm doing wrong.

It's for SaGa Frontier on the Playstation 1.

I want to convert a gameshark code into an assembly hack aka a hex edit.  I want to find the file from which this instruction is loaded, and in the process I want to document and comment the routines so I or someone else can figure out more later.

Here's the code:

Allow Alkaiser to grow stats and learn magic and gun abilities:
d01a665d 4240
301a665d 0000

I went to that location using the pSX debugger.  Turns out the block in which this instruction is found is only loaded in battle.  Here's what it looks like when it's loaded:
Code: [Select]
001a6658: nop                  00000000
001a665c: andi r2,r2,0x4000    30424000 # r2 * 0x4000, load result into r2
001a6660: bne r2,r0,0x01a6718  1440002d # if r2 != 0 (because r0 is always 0) then jump to 0x001a6718, otherwise continue to next instruction.
001a6664: nop                  00000000

If I do what the gameshark code does and change 4240 to 0000 then I get this instead:
Code: [Select]
001a6658: nop                  00000000
001a665c: andi r0,r0,0x0000    30000000 # r0 * 0x0000, load result into r0
001a6660: bne r2,r0,0x01a6718  1440002d # if r2 != 0 (because r0 is always 0) then jump to 0x001a6718, otherwise continue to next instruction.
001a6664: nop                  00000000

I tried searching the disc image for the 8 bytes with make up the two non-nop instructions above, and I found 1 hit, but when I changed them to match the gameshark code they didn't produce the desired result.  They didn't even change the instruction that was loaded at 0x001a665c!

So there must be some other way to figure out which file(s) these instructions come from, unless something else is preventing this from working.

How do you find out which file an instruction is loaded from, at a particular time?

By the way, I am a novice and this is my first real attempt at making an assembly hack, even if I'm just converting someone else's gameshark codes.


Memory map?

http://rveach.romhack.org/PSXInfo/psx%2 ... 20info.txt
http://www.raphnet.net/electronique/psx ... tation.txt

Newcomer's Board / Need a tool for disc images
« on: August 30, 2014, 04:47:35 pm »
I need something that lets you import multiple files at once.  I have 258 files I need to import into a disc image and I don't want to do it one at a time.



This isn't what I wanted but it might work.

General Discussion / Re: Backing up files on Windows 7
« on: July 29, 2014, 09:55:53 am »

Will DiskCryptor work?  I prefer open source software for something so important.

Is there anything which can make a list of hashes to files and tell me when a file doesn't match it's listed checksum?  I've had patches become buggy after sitting on an external hard drive for a few years.

Pages: [1] 2 3 4 5 6 ... 14