Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3   Go Down

Author Topic: Hacking: A Guide to the Data-Structure of Bloodwych  (Read 49563 times)

0 Members and 19 Guests are viewing this topic.

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: A Guide to the Data-Structure of Bloodwych
« Reply #15 on: January 23, 2011, 10:43:59 PM »

Hacking : Wall Scrolls


please await post update or comment on this topic in: The Open Contribution Thread
« Last Edit: January 24, 2011, 10:07:42 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #16 on: January 23, 2011, 10:45:09 PM »

Hacking : Object Data Structure

The data for the objects is stored according to its respective tower / dungeon, and is found at immediately following the map data, in a 1024 ($400) byte block. In the PC version, this is contained with the .ob files for each tower. There is an additional 2 bytes of data at the beginning to define the amount of object data used in the block.

These 1026 byte blocks, are found at the following locations;

[$0FC7C] The Keep
[$1107E] The Serpent Tower
[$12480] The Moon Tower
[$13882] The Dragon Tower
[$14C84] The Chaos Tower
[$16086] Zendik's Tower


The data for the objects is stored in such a way that there is no fixed length for each entry within the data table. This is to allow for only one entry when items are placed on top of one another in the same location.

The first two bytes of data represents the amount of data used for item-placements listed within the data table, and is then followed by the data itself.

In the case of the Keep [$FBBC] (PC: mod0.ob) this is a value of 03 3F.


This is then followed by a minimum of 5 bytes, with an additional 2 bytes added for each extra item in this location.


This can be represented as the following;

       AB CD EF GH IJ  ...  KL MN ... etc



A = The position of the items in the location (4 positions for a standard floor, and 2 positions for a shelf)

      This has one of four options;

00 - Position 1 - North West Space, North Facing Bottom Shelf,  West Facing Top Shelf
04 - Position 2 - North East Space, East Facing Bottom Shelf,  North Facing Top Shelf
08 - Position 3 - South West Space, West Facing Bottom Shelf,  South Facing Top Shelf
12 - Position 4 - South East Space, South Facing Bottom Shelf,  East Facing Top Shelf


BCD = The index number for the location.

       This is not a standard x,y,z coordinate reference, but a number which represents the location according to where it is within the entire map data of the tower / dungeon. This should be taken as an index number, as if the marker is found by "counting through" the map locations. This means that a value of 0 00 would represent the first floor location at coordinate 0,0 on the 0 (bottom) floor of a tower. Moving along to 0,1 would be represented by the index number 0 01 and so on.

EF = The number of items in the given location, minus 1.

       Where there is only one item stored in the location, this has a value of 00. Where there are two items, a value of 01 and so on. This is an important piece of information as with no "termination" byte, it is this which is used to tell us how many bytes of data will need to be read for the object data for this location.

GH - This is the object code for the first item in the location. This is a representation of the item, based on the object lookup table, which will need to be referenced in order to determine which items are in the location.

IJ - This is the number of item GH to be "stacked" at this point. Whilst this is commonly used for Coinage and Common Keys, which are usually place in multiple numbers, this can also be used to stack multiple numbers of any item, to a maximum number of 255.

KL - This is identical to GH, in those situations where EF is greater than zero. It gives the object code for the next item stored at a given location.

LM - Again, this is identical to IJ, in those situations where EF is greater than zero, and gives the number of the item represented bu KL to be stored at the location.



In order to aid the understanding of the object data structure, here is an example piece of code, from the first item stored for the Keep.

        C8 0E 00 07 01

This data would represent:
     1 item on the location (00 on EF.)
     1 (01 on IJ)  x Apple (07 on GH)  at index postion 8 0E (8 OE on B CD), in the C position (C on A.)


The next set of data in the list is:

         88 0E 00 07 01

This data would represent;
    1 item on the location.
    1 x Apple  at index position 8 0E, in the 8 position of the location.


And skipping through to the fourth piece of data we see the following;

         88 8E 02 50 01 30 01 02 05

Which represents;
    3 items on the location
    1 x Bronze Key , 1 x Dagger, 5 x Common Keys  at index position 8 8E in the 8 position of the location.
« Last Edit: June 07, 2011, 12:24:05 AM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #17 on: January 23, 2011, 10:46:36 PM »

Hacking : Bloodwych Object Lookup Table

Objects in Bloodwych are represented by the following codes, in bother the Character Inventory and in the Object Data Blocks for each Dungeon:

01   Coinage
02   Common Keys
03   Arrows
04   Elf Arrows
05   1/3 Apple
06   2/3 Apple
07   Apple
08   1/3 Biscuit
09   2/3 Biscuit
0A   Biscuit
0B   1/3 Chicken
0C   2/3 Chicken
0D   Chicken
0E   1/3 Mead
0F   2/3 Mead
10   Mead
11   1/3 Water
12   2/3 Water
13   Water
14   N'egg (Green)
15   N'egg (Blue)
16   N'egg (Red)
17   Serpent Slime
18   Brimstone Broth
19   Dragon Ale
1A   Moon Elixir
1B   Leather Armour
1C   Chain Mail
1D   Plate Mail
1E   Mithril Chain
1F   Mithril Plate
20   Adamant Chain
21   Adamant Plate
22   Crystal Chain
23   Crystal Plate
24   Leather Shield
25   Buckler
26   Rune Shield (Classic)
27   Large Shield
28   Moon Shield
29   Dragon Scale
2A   War Shield
2B   Chaos Gloves
2C   Battle Gloves
2D   Mithril Gloves
2E   Adamant Gloves
2F   Crystal Gloves
30   Dagger
31   Stealth Blade
32   Short Sword
33   Long Sword
34   Mithril Sword
35   Fleshbane
36   Demon Blade
37   Ace of Swords
38   Battle Axe
39   Mithril Axe
3A   Troll's Axe
3B   Brainbiter
3C   Deathbringer
3D   Staff
3E   Battle Staff
3F   Power Stadd
40   Blodwyn (RIP)
41   Murlock (RIP)
42   Eleanor (RIP)
43   Roseanne (RIP)
44   Astroth (RIP)
45   Zothen (RIP)
46   Baldrick (RIP)
47   Elfric (RIP)
48   Sir Edward (RIP)
49   Megrim (RIP)
4A   Sethra (RIP)
4B   Mr. Flay (RIP)
4C   Ulrich (RIP)
4D   Zastaph (RIP)
4E   Hengist (RIP)
4F   Thai-Chang (RIP)
50   Bronze Key
51   Iron Key
52   Serpent Key
53   Chaos Key
54   Dragon Key
55   Moon Key
56   Chromatic Key
57   Serpent Wand
58   Chaos Wand
59   Dragon Wand
5A   Moon Wand
5B   Heal Wand
5C   Long Bow
5D   Frost Bow
5E   Cross Bow
5F   permit
60   Serpent Crystal
61   Chaos Crystal
62   Dragon Crystal
63   Moon Crystal
64   Grey Gem
65   Bluish Gem
66   Brown Gem
67   Tan Gem
68   Grey Ring
69   Serpent Ring
6A   Chaos Ring
6B   Dragon Ring
6C   Moon Ring
6D   Book of Skulls

« Last Edit: June 06, 2011, 10:06:45 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #18 on: January 23, 2011, 10:47:24 PM »

Hacking : Bloodwych : Extended Levels Object Lookup Table

Objects in Bloodwych : Extended Levels are represented by the following codes, in bother the Character Inventory and in the Object Data Blocks for each Dungeon:

01   Coinage
02   Common Keys
03   Arrows
04   Elf Arrows
05   1/3 Apple
06   2/3 Apple
07   Apple
08   1/3 Biscuit
09   2/3 Biscuit
0A   Biscuit
0B   1/3 Chicken
0C   2/3 Chicken
0D   Chicken
0E   1/3 Mead
0F   2/3 Mead
10   Mead
11   1/3 Water
12   2/3 Water
13   Water
14   N'egg (Green)
15   N'egg (Blue)
16   N'egg (Red)
17   Serpent Slime
18   Brimstone Broth
19   Dragon Ale
1A   Moon Elixir
1B   Leather Armour
1C   Chain Mail
1D   Plate Mail
1E   Mithril Chain
1F   Mithril Plate
20   Adamant Chain
21   Adamant Plate
22   Crystal Chain
23   Crystal Plate
24   Rune Shield (Red)
25   Rune Shield (Green)
26   Rune Shield (Black)
27   War Shield
28   Demon Scale
29   Battle Soul
2A   Chromatic Plate
2B   Chaos Gloves
2C   Battle Gloves
2D   Mithril Gloves
2E   Adamant Gloves
2F   Crystal Gloves
30   Dagger
31   Stealth Blade
32   Adamant Sword
33   Fleshbane
34   Demon Blade
35   Rune Sword
36   Soul Sucker
37   Ace of Swords
38   Adamant Axe
39   Ogre's Axe
3A   Deathbringer
3B   Dragon Axe
3C   Grey Axe
3D   Staff
3E   Battle Staff
3F   Power Stadd
40   Blodwyn (RIP)
41   Murlock (RIP)
42   Eleanor (RIP)
43   Roseanne (RIP)
44   Astroth (RIP)
45   Zothen (RIP)
46   Baldrick (RIP)
47   Elfric (RIP)
48   Sir Edward (RIP)
49   Megrim (RIP)
4A   Sethra (RIP)
4B   Mr. Flay (RIP)
4C   Ulrich (RIP)
4D   Zastaph (RIP)
4E   Hengist (RIP)
4F   Thai-Chang (RIP)
50   Bronze Key
51   Iron Key
52   Serpent Key
53   Chaos Key
54   Dragon Key
55   Moon Key
56   Chromatic Key
57   Serpent Wand
58   Chaos Wand
59   Dragon Wand
5A   Moon Wand
5B   Heal Wand
5C   Long Bow
5D   Frost Bow
5E   Cross Bow
5F   Permit
60   Serpent Crystal
61   Chaos Crystal
62   Dragon Crystal
63   Moon Crystal
64   Grey Gem
65   Bluish Gem
66   Brown Gem
67   Tan Gem
68   Grey Ring
69   Serpent Ring
6A   Chaos Ring
6B   Dragon Ring
6C   Moon Ring
6D   Book of Skulls
« Last Edit: June 06, 2011, 10:07:27 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #19 on: January 23, 2011, 10:48:25 PM »

Hacking : Monster Data Structure


In the game binary, information about the monsters is stored in batch by tower, in a 'packed' form.

This is then unpacked to a larger memory space on entering each Tower/Game Start.

Monsters that have not been killed are then returned to the 'packed' form on exiting the tower. This has the effect of reseting some monster statistics (such as monster hit points)

There are 6 digits in BW which mark the number of monsters per tower at [$171F4]


As raw data these can be found as:

                00 48 00 4D 00 53 00 43 00 4F 00 4D


This is followed by 300 byte blocks, each containing the detailed information about the monsters, at the following locations;

                [$17200] The Keep
                [$17500] The Serpent Tower
                [$17800] The Moon Tower
                [$17B00] The Dragon Tower
                [$17E00] The Chaos Tower
                [$18100] Zendik's Tower


At these locations, you find the monster data stored in 6 byte blocks.

As an example. the following shows you the data for the first 8 monsters in The Keep.

                04 0B 0F 00 15 FF
                04 16 1A 00 16 FF
                05 02 00 04 15 FF
                04 0F 0F 00 2F FF
                14 03 09 00 11 FF
                04 06 00 01 14 FF
                04 06 01 00 14 FF
                04 06 03 01 14 FF


By breaking this down by byte we can begin to understand what this data represents;

                AB CD EF GH IJ KL


A = Type of Monster
   
     This can be one of three values;
     0 - Normal Fighting Monster
     1 - Spell-casting Monster
     3 - Arc Bolt Machine

B - The number of the tower floor on which the monster starts.

CD - The X-coordinate postiioning of the tower floor on which the monster starts.

However, if between two and four monsters are to start in the same location (teamed) this number is left void and given a value of FF on the second to fourth team-members.

EF - The Y-coordinate positioning of the tower floor on which the monster starts.

GH - The level of the monster. This determines the monsters strength, speed, available spells, and for non-humanoid monsters also the colour of the monster.

In the Extended Levels Vol.1 this also acts as a seed number to help generate the monster's name

IJ - This is the form / look of the monster. This number represents those given in the monster lookup table.

KL - This is the rather unusual "team-data" number. In the majority of cases this is left blank with the value of FF.
However, when two monsters are to begin the game "teamed" with the same starting postion, this value simple increases from 00 and beyond, for every teamed-monster.

For example, two monsters both placed at X04 Y06 would have the team-data values of 00 and 01 respectively, and this would continue with the next two teamed monsters in the list having the values of 02 and 03.



This picture shows the data represented in the beta version of the Amiga Bloodwych Editor:


« Last Edit: March 15, 2016, 07:14:03 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #20 on: January 23, 2011, 10:48:57 PM »

Hacking : Monster Lookup Table


please await post update or comment on this topic in: The Open Contribution Thread
« Last Edit: January 24, 2011, 10:07:06 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #21 on: January 23, 2011, 10:49:33 PM »

Hacking : Bloodwych Champion Data Structure

The champion data block gives us lots of information regarding our live Champion information. There are 16 ($10) entries here, each of length $20.

The champions are listed in the following order:

- Blodwyn
- Murlock
- Eleanor
- Roseanne

- Astroth
- Zothen
- Baldrick
- Elfric

- Sir Edward
- Megrim
- Sethra
- Mr. Flay

- Ulrich
- Zastaph
- Hengist
- Thai Chang

Bloodwyn Stats - SPS102 addresses
File Location: [$E866] - Bloodwyn Stats
Memory Location: ($EB2A - tbc)
 
($EBD0  = tbc?)


Bloodwyn Stats - SPS439 addresses
File Location: [$E7A6] - Bloodwyn Stats
Memory Location: ($ - tbc)

Example Data:
01 23 11 0D 0D 23 23 1F 1F 06 09 05 80 00 00 00
C7 FF 00 00 00 00 07 09 02 00 03 00 00 00 00 00

Detail:
Each byte of data sets out differing information for the champion, defined as follows:

-   Byte 00 = Character Level
-   Byte 01 = Strength
-   Byte 02 = Agility
-   Byte 03 = Intelligence
-   Byte 04 = Charisma
-   Byte 05 = Current HP
-   Byte 06 = Max HP
-   Byte 07 = Current Vitality
-   Byte 08 = Max Vitality
-   Byte 09 = Current Spell Points
-   Byte 0A = Max Spell Points
-   Byte 0B = Armour Level
-   Byte 0C = Spells Page 1 (one bit per spell)
-   Byte 0D = Spells Page 2
-   Byte 0E = Spells Page 3
-   Byte 0F = Spells Page 4
-   Byte 10 = Food Level (max C7)
-   Byte 11 = Current Worn Spell (08 = Amour etc..)
-   Byte 12 = Current Worn Hand Amour
-   Byte 13 = Related to spell (Unsure how)
-   Byte 14 = Related to spell cost (Unsure how)
-   Byte 15 = Spell Cool Down Timer
-   Byte 16 = X position
-   Byte 17 = Y Position
-   Byte 18 = bits 4-5 (left) Floor position  |  bits 0-1 (right) direction faced
-   Byte 19 = Character speed
-   Byte 1A = Floor
-   Byte 1B = Attack cool down (counts down from 07 to 00, also used for attack sequence)
-   Byte 1C = Levelling Value (change to FF to level, 11 = level 1, 24 = level 2)
-   Byte 1D = XP to next level (Starts at 255 and then as you hit monsters this is reduced down to 00 and Byte 1C is changed to FF)
-   Byte 1E = Amount of spells to buy from the fairy
-   Byte 1F = ?


« Last Edit: March 15, 2016, 07:11:00 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #22 on: January 23, 2011, 10:49:53 PM »

Hacking : Bloodwych : Extended Levels Champion Data Structure

$F586 - Bloodwyn Stats - 4 lines in BEXT, followed by other 15 champions or recruited monster. (tbc)



please await post update or comment on this topic in: The Open Contribution Thread
« Last Edit: January 24, 2011, 10:06:29 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #23 on: January 23, 2011, 10:50:13 PM »

Hacking : Bloodwych Pockets Data Structure

$ED2A - Blodwyn Pocket contents (tbc)



please await post update or comment on this topic in: The Open Contribution Thread
« Last Edit: January 24, 2011, 10:06:16 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #24 on: January 23, 2011, 10:50:43 PM »

Hacking : Bloodwych : Extended Levels Pockets Data Structure


please await post update or comment on this topic in: The Open Contribution Thread
« Last Edit: January 24, 2011, 10:06:00 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #25 on: January 23, 2011, 10:51:16 PM »

Hacking : Menu Layout


please await post update or comment on this topic in: The Open Contribution Thread
« Last Edit: January 24, 2011, 10:05:51 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #26 on: January 23, 2011, 10:51:48 PM »

Hacking : Keyboard Controls


It is possible to modify some of the Keyboard functions of Bloodwych fairly easily.


Starting with the very basics, the following is the code for the player 1 and player 2 keyboard controls for movement;

5F 46 4E 4F 4D 4C      12 10 22 20 21 11

This can be found in BW at ($0656) [$02EC] - or can be searched for manually.


These hex numbers represent the keycodes for :

Help - Del - Cursor Right - Cursor Left - Cursor Down - Cursor Up - E - Q - D - A - S - W

and can be substituted for alternative keycodes if wanted, in order to change the in-game keys.



It is also possible to change the operation of the key-controls for the main menu, but this is discussed seperately in the Menu Layout section of this resource.

For reference, the Amiga keycodes are laid out as such;

« Last Edit: June 07, 2011, 01:21:47 AM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #27 on: January 23, 2011, 10:53:07 PM »

Hacking : Mouse and Joystick Controls


please await post update or comment on this topic in: The Open Contribution Thread
« Last Edit: January 24, 2011, 10:05:41 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #28 on: January 23, 2011, 10:53:38 PM »

Hacking : Quickstart Defaults

please await post update or comment on this topic in: The Open Contribution Thread

« Last Edit: January 24, 2011, 10:05:22 PM by Hungry Horace »
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: A Guide to the Data-Structure of Bloodwych
« Reply #29 on: January 23, 2011, 10:54:15 PM »

Hacking : Keyboard Reading Routines

The keyboard routine starts at $5D6
The game reads the keyboard and stores the result at memory location $5D1 where it is read in later.

- it loads $bfe001 into reg a0
- it then does a move.b ($c00,a0),d0
- which basically does move.b $c00+$bfe001,d0
- This is equivalent to move.b $bfec01,d0
- which moves the raw keycode into d0

Code: [Select]
lea  $656,a0               ; Copy address into a0
moveq  #b,d1               ; For loop, checking 12 things
cmp.b  (a0)+,d0            ; check to see if the contents of mem location a0 are same as d0
                           ; and increment the address at a0 by 1 byte (first time a0 would change to $657)
beq  $063a                 ; If they match lets branch
dbf  d1,$630               ; decrease d1 by 1 and loop
rts                        ; return from routine

« Last Edit: January 23, 2011, 11:09:40 PM by Hungry Horace »
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

Pages: 1 [2] 3   Go Up
 

TinyPortal 2.2.2 © 2005-2022