Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5 6 ... 11   Go Down

Author Topic: Hacking: Open Contribution Thread  (Read 76471 times)

0 Members and 5 Guests are viewing this topic.

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #45 on: June 21, 2011, 01:47:25 PM »

Attached is Bloodwych Data Disk ST Binary (354,162 bytes)

I have made some progress tonight around removing my hard coded offsets.

I am in the middle of creating a method to inspect a binary and return the offsets. This will then be saved out to JSON format.

At present the output is hard-coded, but I can ingest from the JSON file, so now I read my offsets from a configurable file.

Attached text file shows my JSON config. Setup would mean inspecting a binary then adding (copy/paste) the result into this file and tweak, then you can choose to ingest from a list of known configs.

Next Steps
- finish my binary inspector to determine offsets from inspecting binary
- ingest all known binary data offsets for the BCF that I have yet to ingest
- upgrade my mapper to show other relevant data yet to ingest
- get an Amiga binary and attempt to ingest
- get the PC binary and attempt to ingest (may need upgrades to the config, since not just 1 binary...)
Logged
Look to the towers my friend

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #46 on: June 21, 2011, 11:03:52 PM »

looking good!! and thanks again for the binary.

I was thinking, with regards to the PC version, i might make something that merged all the files, processed it accordingly, and then split the files back out again.

The woodtrap code is the only thing I am concerned about here, because it wont be 68k asm. I've had a quick search for the x/y coords but i cant find them - i think it would be pretty easy though to put into the generated config file (like you JSON one) something that says "woodtrap editing disabled" and simply have that turn the option off on the editor.

everything else that is not a .map/.ob file appears to be inside the main BWYCH.EXE file :D

Probably gonna have to take a break from BW for the next 2 weeks though while I complete my college work though (it's the end of term)... a shame, because I am quite getting into all this again now!!
« Last Edit: June 21, 2011, 11:27:07 PM by Hungry Horace »
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #47 on: June 22, 2011, 12:44:26 AM »

Yes that does sound like a good idea to merge the PC files.

I have been tempted though to expand my configuration to allow for reading multiple files (so effectively there would be 1 ingestion process, regardless of how the files are named/laid out). I'll see how I go.

At the moment I don't worry about ingesting the woodtraps, but agree that might be something to disable if not easy to work with the PC version.

No worries if you need a break. I have a few things too that might impact my BW development time in the next few weeks. It's a fun little hobby though :)

Logged
Look to the towers my friend

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #48 on: June 22, 2011, 02:24:29 PM »

Ok - got my app to inspect the Atari ST code and retrieve all offsets (except for woodtraps and gem specifics). My numbers agree with yours :)

Basically by taking the first x bytes of the known code and using that as a list of bytes to match against. So hopefully now I can point it at any BW binary and get those offsets out.

Next step there would be to allow it to work over many files... (for PC and BCF files)

However, I think next I'll get the floor offsets, scrolls, etc. that I'm not ingesting yet into my mapping tool.
Logged
Look to the towers my friend

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #49 on: June 22, 2011, 08:24:20 PM »

my "searcher" program seems to be working, but it takes ages to process the file (then again, its running uncompiled on AMOS!)

i also obly checked 8 bytes, so i couldnt use the first 8 bytes (because of the triggers/switches being the same at that point mostly) but this has caused a problem with the "repetitive" pockets data being incorrectly found, so i will need to do a bit more investigation!

Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #50 on: June 22, 2011, 11:50:58 PM »

i've made and adapted my own thing to lookup offsets. It's not brilliant but it works!
attached is a zip file containing the output of a few processes... the amiga binaries and a couple of ST disk images, plus your CODE file.

The way i've set it up, means that when i have some BEXT BCF files, i'll be able to use the same program to search those binaries as well :)
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #51 on: June 23, 2011, 12:54:10 PM »

That's excellent :)

In other news, my party of Murlock, Sethra, Sir Edward and Megrim are on their way out of the Serpent tower and heading to the Moon Tower. It's really strange being able to play Bloodwych with a map alongside. I'm also surprised at how much I still remember :)

Logged
Look to the towers my friend

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #52 on: June 23, 2011, 02:32:19 PM »

Hooray! I've got my inspector reading all but the woodtrap locations (which is not a biggie for me at the moment anyway)

I've also got my mapper obeying offsets and determining the special floors. :)

Which are (Atari ST): K3, S3, M3, D7, C5, Z4. (Not determined what it means yet)

Next stop is the champion data - do you have any info on parsing these? The pockets seem straightforward, but the stats, spells and start positions look a little more tricky...
Logged
Look to the towers my friend

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #53 on: June 25, 2011, 02:13:16 PM »

Scrolls
Assuming the first scroll in the list is ID=0.

Whenever you have a stone wall cell (AB CD, where D=1)
Cells with a scroll can be found using:

if ((args.AB >= 0x15) && (args.AB % 4 == 0x1))
            {
                DisplayState = EnumDisplayState.Message;
            }

And the Scroll ID can be determined using:

ScrollID = (args.AB-0x15) >> 0x02;


Each tower then applies an offset to this scroll id to pick the correct scroll from the list.
I have figured these out and they are as follows:

The Keep = 0,
Serpent Tower = 0x15,
Moon Tower = 0x21,
Dragon Tower = 0x29,
Chaos Tower = 0x31,
Zendick's Tower = 0x3B

i.e. so scroll ID = 0 for the serpent tower would be 0x15...
Logged
Look to the towers my friend

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #54 on: July 06, 2011, 12:15:41 PM »

Well I've been playing through and am now just at the start of Zendik's tower.

No idea what the significance of the special floors are, I guess without understand the source code we won't know.

Once I complete Bloodwych, I'll probably start on the data disk. At that time I'll get my mapper to extract the Extended levels too (hopefully)
Logged
Look to the towers my friend

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #55 on: July 09, 2011, 02:24:59 PM »

Well, Bloodwych is complete, so now onto the data disks.

(Internally I seem to be naming the games B1 and B2, which reminds me of the Bananas In Pyjamas, but that's another story...).

So, in good news, it didn't take much effort to get my map ingestor working with the data disk. With some prior knowledge of the game (and that there are only 4 "towers"), plus some searching through the Hex source, I've found offsets for everything I needed.

(These numbers are all in decimal)
"OffsetMap": [
        63920,
        69042,
        74164,
        79286
      ],
      "OffsetMonstersTotals": [
        88180,
        88182,
        88184,
        88186
      ],
      "OffsetMonsters": [
        88188,
        88956,
        89724,
        90492
      ],
      "OffsetObjects": [
        68016,
        73138,
        78260,
        83382
      ],
      "OffsetScrollsBlock": 96358,
      "OffsetSwitches": [
        25832,
        25896,
        25960,
        26024
      ],
      "OffsetTriggers": [
        31286,
        31414,
        31542,
        31670
      ]


Most of the original bloodwych ingestion worked like a charm with this, but there are a few new monster types, switch types and trigger types which I haven't identified yet - must be new in BEXT. Details below.

It was bizarre to see there are only 2 wall scrolls, I'd forgotten they weren't really used in BEXT.

Monsters:
As we know, data of the form AB CD EF GH IJ KL, where A is the type.

I now have:

                case 0x00:
                    Type = EnumType.Normal;
                    break;
                case 0x01:
                    Type = EnumType.Spellcaster;
                    break;
                case 0x02:
                    Type = EnumType.Drone;
                    break;
                case 0x03:
                    Type = EnumType.DroneSpellcaster;
                    break;
                case 0x04:
                    Type = EnumType.ArcBolt;
                    break;
                case 0x08:
                    Type = EnumType.Unknown08;
                    break;
                case 0x09:
                    Type = EnumType.Unknown09;
                    break;


I think Unknown08 and Unknown09 might relate to monsters who have to drop a specific object (e.g. a key), but not sure at this stage.


Triggers
For Triggers, some new types not see in the original...

                case 0x00:
                    Type = EnumType.Unknown00;
                    break;
                case 0x3E:
                    Type = EnumType.Unknown3E;
                    break;
                case 0x40:
                    Type = EnumType.Unknown40;
                    break;

I'd bet one of these is to do with the "Summon Generation" trigger pads, but not sure yet.


Switches
For switches, i found quite a few new types:

                case 0x00:
                    Type = EnumType.Unknown00;
                    break;
                case 0x10:
                    Type = EnumType.Unknown10;
                    break;
                case 0x12:
                    Type = EnumType.Unknown12;
                    break;
                case 0x14:
                    Type = EnumType.Unknown14;
                    break;
                case 0x16:
                    Type = EnumType.Unknown16;
                    break;

Not a clue what these do yet...

Logged
Look to the towers my friend

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #56 on: July 09, 2011, 08:03:45 PM »

i think you are right about the monsters that drop stuff (i.e. keys or potions).

also look out for some strange 'types' of monsters...  these would be spells (infernos) which 'launch' the moment you enter that particular floor/tower iirc.

nice to see all this progress! cant wait to know what all those extra gubbins are!
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #57 on: July 17, 2011, 11:48:28 AM »

3/4 towers down, lots of interesting things discovered... :)

Monster types 8 and 9: as far as I can tell, 8 is normal, 9 is spellcaster. The main difference is they drop special objects when killed. This may be a key, or a specific weapon, or even a crystal (in the case of the behemoths that drop crystals)

As to what determines these objects in code, I have yet to ascertain...

I also have some findings on those unknown switches and triggers, but don't have the details at hand. The main new types are those "summon" generators and the switch walls that generate behind you. I also noticed a nice quirk in the moon tower of wood wall cells with no wood walls set - these stop the switch walls from spreading. 
Logged
Look to the towers my friend

murlock

  • Chaos Wizard
  • A600
  • *
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 34
Re: Hacking: Open Contribution Thread
« Reply #58 on: July 23, 2011, 06:21:34 AM »

Hurrah! Data disks complete!

Summary of new types:

Monsters:
                case 0x00:
                    Type = EnumType.Normal;
                    break;
                case 0x01:
                    Type = EnumType.Spellcaster;
                    break;
                case 0x02:
                    Type = EnumType.Drone;
                    break;
                case 0x03:
                    Type = EnumType.DroneSpellcaster;
                    break;
                case 0x04:
                    Type = EnumType.ArcBolt;
                    break;
                case 0x08:
                    Type = EnumType.ObjectHolderNormal;
                    break;
                case 0x09:
                    Type = EnumType.ObjectHolderSpellcaster;
                    break;

Triggers

                case 0x3E:
                    Type = EnumType.GenerateSummons;
                    break;
                case 0x40:
                    Type = EnumType.CreateSpecialWallWithSwitch;
                    break;

Switches

                case 0x10:
                    Type = EnumType.OpenVoidLockDoor10;
                    break;
                case 0x12:
                    Type = EnumType.SpecialWallWithSwitch12;
                    break;
                case 0x14:
                    Type = EnumType.CreatePad14;
                    break;
                case 0x16:
                    Type = EnumType.TogglePad16;
                    break;



Logged
Look to the towers my friend

MadMunky

  • Forum Mod
  • A600
  • *****
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Hacking: Open Contribution Thread
« Reply #59 on: August 03, 2011, 11:19:33 AM »

Interesting stuff, always checking back for update on whats happening in the world of Bloodwych so good to see the work you are doing, I've just started learning VB .Net myself in the hope to make a level editor and maybe one day a remake.

Would it be possible to see your C# code as although I cant write it, it would be interesting to read though.
Logged
Pages: 1 2 3 [4] 5 6 ... 11   Go Up
 

TinyPortal 2.2.2 © 2005-2022