Development

Thursday, August 21, 2008

Skills again

Been thinking more about skills lately. I had only 1 attribute, speed, this is used to govern combat ordering.

I’ve been tweaking up some additional things, going to move speed out and create some general skills, something along the lines of;

- physical fatigue
- mental fatigue

All will be 100% based, rather than skill level based, and will probably fluctuate wildly throughout the game. This will impact things like how susceptible to poison the player is etc, ability to cast spells. Beginning players will start out something like 50% or 60%. Advancing physical skills will increase your base physical fatigue, so to learning other things will train the mental aspect. Some spells will require a certain skill level as well as a certain mental level.

Ive decided, the order of combat shall be randomised. Everyone will be put in the list and picked to go randomly.

If in testing that doesn’t pan out very well, I may just end up with a fast/normal/slow designation for every monster (PC’s will be normal) and randomly pick from the fast bucket until empty, then normal bucket then slow bucket etc.

For some reason, I keep getting stuck opon this order of combat thing, when it shouldnt be such a big deal, but I keep wanting to factor in a speed variable or something somewhere.

The skill list has been closed out, I’m finally happy with the result. All weapon types begat a certain skill. Swords require a sword skill, Hammer requires hammer, mace for mace etc etc etc. It was a long skill list. The more I thought about it, the more apparent that it was fairly useless. All the weapons were much the same but changed only in name. This first game is not about trying to add in the complexity of a roguelike which gets years of playing and balancing.

So, to that order I knocked back the skill list to something I had originally but later scrapped,

Weapons now fall into one of two skills
- Melee combat (for all swords, axes, maces etc)
- Ranged combat (for all bows, slings, javelins, darts, stars, meteor hammers, three sectional staff, manriki, etc)

The only downside is that it categorises long distance ranged weapons (bow) with short distance ranged weapons (three sectional staff).

Some weapons just don’t categorise very well, like a spear, its long range but also short range. A hand axe is a melee weapon, but can be thrown..

There are also base line weapons that don’t require any skill (knife, sling etc) giving every character something to start with.

Posted by Stu on 08/21 at 10:48 AM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Commented on by (0) people. Read or Post Comments Here

Wednesday, August 13, 2008

Items data

Managed to do some work on Fishguts last night, after a long hiatus.

I’ve had a spreadsheet with item info in it for ages, and occasionally I will add some new stuff or tweak their stats.

Well, after much procrastination I broke open the Open Office Basic and wrote an export.

Ugh, what would have taken 5 minutes in Excel’s VBA took ages in OOBasic. OOB is a real nightmare. The differences are beyond night and day. I dont think I have anything good to say about the OOB implementation.

At any rate, I now have my items exporting correctly, its about 95% done and I need to tweak it a bit since right now it does not export any special fields (eg: +2 vs undead).

Its kinda nice to all of a sudden see items in the shop with correct pricing and such rather than everything costing 1gp and only basic test items present.

It has also forced me to solidify my skill system a bit, now with specific item skills. I did add some new stuff on a whim I had not previously intended to add (lol feature creep) but its a new weapon class mostly intended for thieves and their ilk (a throwing weapons skill)

Posted by Stu on 08/13 at 08:18 AM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Commented on by (0) people. Read or Post Comments Here

Thursday, July 31, 2008

BATS

So SmartFirmware starts up in virtual mode, and its memory is mapped back to itself, anyway, its handy to know.
User and Supervisor both have Read/Write access currently. Not sure why we have data mapped at 0x80000000.

IBAT1+DBAT0 corresponds to the MBAR. Maybe the data in DBAT3 is where the x86 video card is residing, its a common PCI memory space address…

The rest of the bats were full of junk and marked no-access more or less.

(BAT’s dump after the jump)

Click HERE to read more

Posted by Stu on 07/31 at 06:53 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Inventory Management changes

I had a bit of a inventory brainfart today.

I have realised, with a game that has such tactical combat as I am going to have, I need to drop the unified inventory management system and instill a separate inventory for each character.
Think, character A on one side of the battle field swaps his sword for a bow, character B on the _other_ side of the field say 90 squares over, swaps his mace for character As sword, so yeah a unified inventory is great when you are constantly in party mode, but when characters are split up across the map, it fails somewhere (and I’m not talking the breaking of the simulation, this is after all a fantasy crpg with magic and such).

Lets think things over.

1 - We have tactical combat that situations will call for changing weapons etc in combat
2 - You may run out of arrows and need to change weapons
3 - Wear and Tear factor into gear
4 - Different gear can only be used with certain skills
5 - The need to tote different gear around because of 4

Inventory management is a real bear in any game, there is no right/easy way to do it, I don’t much like the Diablo method, or inventory slots, only inventory slots are the easiest to implement.

Yes one of the things is this game is about killing your opponents, scavenging the loot, finding better weapons etc and unloading the junk.

There is two things to consider;

1 - Shop management, buying weapons on a per character basis.
2 - Inter Character inventory management.

My take on #1 is that you enter the shop, choose to buy something and buy it. Once you have bought it, the game should then ask you whom to give it to.
As for #2, that is a bit harder. I was thinking a split screen system. Up/Down scrolls up and down the gear in character A, button press moves it to the other side. Press left/right to switch between the two characters etc. That lets you easily trade gear between the two. This from a “Trade Gear” option in the main menu.  At the top of the screen above the gear list will be the character names, scrolling up highights the character name letting you pick another character to trade to.

I need to mock it up and test it and see how feasible it is.

Posted by Stu on 07/31 at 11:01 AM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Comments are closed There are no comments on this entry.

Monday, July 28, 2008

Grins and Giggles

Just for grins and giggles, I’ve dumped the firmware tree, in order to help me find things… see below the jump

Click HERE to read more

Posted by Stu on 07/28 at 06:30 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Not a huge achievement but its a step

Right now I’m trying to fully parse the device tree so I can leave OF and jump into AROS.
The next step is to write the MPC5200 SOC drivers AROS needs (scheduler, mmu, timer, etc)

(The relevant bit is at the bottom of the boot message)

EFIKA 5K2 Boot Strap [RELEASE BUILD] (c) 2002-2007 bplan GmbH (BUILD 20070122 84240)
Running on    CPU PVR: 0x80822014
Running on system SVR: 0x80110022
BIOS Code position: 0xFFF040D0
Setup System Config…                                                 Done.
Setup Memory Config…                                                 Done.
Setup PCI…                                                           Done.
Setup ATA…                                                           Done.
Setup USB…                                                           Done.
Setup ETH…                                                           Done.
Setup AC97…                                                          Done.
Testing 08000000 Bytes, Pass: 00000000 Failed: 00000000
RAM TEST (fill random)…                                              Done.
cpu0: PowerPC,G2 CPUClock 396 Mhz BUSClock 132 Mhz (Version 0x8082,0x2014)
channel 0 unit 0 :   ata | ST920217A                                | 3.01    
ATA device not present or not responding
EMULATION INT HANDLER ENTERED WITH:
INT NO: 15

EAX=0003 EBX=1111 ECX=2222 EDX=3333 ESP=0000 EBP=5555 ESI=6666 EDI=7777
 AX=4E08  BX=C405  CX=0003  DX=102A  SP=6C1C  BP=5555  SI=5C6B  DI=7777
 DS=C000  ES=BAD0  SS=C000  CS=F000  IP=FE15   NV UP -- PL ZR NA PE NC
CS:IP = F4   FS=BAD4  GS=BAD5C4CA C000 0244 3000 0000 01B4 ABD5 0200 
UNHANDLED INT 10 FUNCTION 0007 WITHIN EMULATION
VM using 1657003 x86 cycles for GFX init
Welcome to SmartFirmware(tm) for bplan EFIKA5K2
Version 1.3 (20070122084838)
SmartFirmware(tm) Copyright 1996-2001 by CodeGen, Inc.
All Rights Reserved.
Pegasos BIOS Extensions Copyright 2001-2007 by bplan GmbH.
All Rights Reserved.
ok boot eth:0192.168.0.102 loader

** EFIKA Init **
BOARD : EFIKA5K2, revision 2B3
OpenFirmware : 1.3, 20070122
CPU : Version 0x8082 (Revision 0x2014), v2.2, 396 MHz (Bus 132 MHz) 
MBAR is at 0xF0000000
scanning memory:
    block 0 - 131072kb at 0x00000000
    block 1 - 16kb at 0xF0008000
Memory : 128MB
RTAS : base 0x7ffb000, entry 0x7ffb000, size=0x43bc


** OUT **

Posted by Stu on 07/28 at 02:13 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Saturday, July 26, 2008

PowerPC Assembly

So I’m slowly getting my head around PPC assembly. Its not too dissimilar to x86 (in the backwardness), but ugh, loading things in high/low combinations.  erugh.

Anyway, IEEE 1275 Open Firmware specs dictate what the register state be on load, so I’m hoping thats what the efika will present me.

The sooner I can get out of the assembler bootstrap and back into the C bootstrap the better smile… Will see if the MBAR is at 0x80000000 or not like reset say it supposed to be…

Posted by Stu on 07/26 at 07:00 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Wednesday, July 23, 2008

bootup.. not.. down..

Well we have a compiled bootloader but it doesnt yet properly talk OF/PROM. I think the biggest reason is I did not specify a start routine and just linked it to a binary.

Its a start, I hope soon to at least have some kind of brnigup on the bootloader.

Posted by Stu on 07/23 at 07:30 AM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Sunday, July 20, 2008

Lets start work

So, now I have a half decent tool chain, its time to start working on

make kernel-bootloader-efika-ppc

The first build issue is its looking for a proto/kernel.h

I know WHERE its looking for it… Only that its generated, in the sense that the AROS build system copies it from who knows where or pre-generates it from some other file..

Finding where it comes from is the damn hard part.

Posted by Stu on 07/20 at 08:36 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Saturday, July 19, 2008

MorphOS 2.0

I booted up the morph os 2.0 demo to see what it was like.

First boot up, I had all the files on an EXT2 partition on my usb stick, OF booted MorphOS but then MorphOS couldnt read it to see the iso image..

Second time I tried to install it, it installed into the same directory on the USB stick as the iso image, ignorning the HD0 line.. The the timer kicked in and slowed it down to a crawl.

Third time, I got it installed onto my HD, I was using the boot SYSTEM HD0 partition as SFS with 1kb block sizes, which I guess the OF didnt like as it wouldnt see anything on the disk and boot it.

Fourth time around I changed the boot HD0 to 512b SFS and now the OF can see it and boot accordingly.

I dont know if its the demo or not but there is no ‘shutdown’ command that I could find. Overall it seems to run fairly well, it taxes the efika a bit, moving the slider in a file selection list will crank the cpu way high temporarily.

What I can run, runs very nicely at 1200x1024x24bit.

Booting the boot.img from USB takes a very very long time.
Booting the boot.img from TFTP takes seconds…

Id like to see how something like finalwriter ran.. if it could run… anyway…

Posted by Stu on 07/19 at 03:59 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Thursday, July 17, 2008

EFIKA Cross Compiler

These are some rough notes on building a powerpc cross compiler.

I have not yet worked out if AROS needs an powerpoc-eabi or powerpc-elf cross compiler, so I have build an -eabi version.

This set of notes should help you build a currently up to date when written gcc-4.3.0 cross compiler.

My host machine is an AMD64 Ubuntu 8.04 linux machine.  For Ubuntu users, make sure /bin/sh is symlinked to bash and not dash.

Pick a base directory ( I’m using ~/cross ) and pick an output prefix ( I’m using /opt/efika ).

You will need;

binutils-2.18
gcc-core-4.3.0
newlib-1.16.0
gdb-6.8
gmp-4.2.2
mpfr-2.3.1

Start with some basic setup

1 - untar all of them into a base directory,

Compile and build binutils

2 - mkdir build-binutils
3 - cd build-binutils
4 - ../binutils-2.18.0/configure --prefix=/opt/efika --target=powerpc-eabi --disable-nls
5 - echo “MAKEINFO = :” >> Makefile
6 - make
7 - sudo make install
8 - export PATH=$PATH:/opt/efika/bin

Step 5 works around a known bug in binutils 2.18 regarding makeinfo

Compile and build the bootstrap gcc
Optionally for AROS, I here apply the paramstack patch against gcc. (check aros/contrib/gnu/gcc for patches)

1 - cd gcc-4.3.0
2 - ln -s ../gmp-4.2.2 gmp
3 - ln -s ../mpfr-2.3.1 mpfr
4 - ln -s ../newlib-1.16.0 newlib
5 - cd ..
6 - mkdir build-gcc
7 - cd build_gcc
8 - ../gcc-4.3.0/configure --prefix=/opt/efika --target=powerpc-eabi --without-headers --with-newlib --with-gnu-as --with-gnu-ld --disable-nls
9 - make all-gcc
10 - sudo make install

Time to build newlib

1 - mkdir build-newlib
2 - ../newlib-1.16.0/configure --target=powerpc-eabi --prefix=/opt/efika --disable-nls
3 - echo “MAKEINFO = :” >> Makefile
4 - export PATH=/opt/efika/bin:$PATH
5 - make
6 - sudo make install

You can see the same bug here in newlib as was present in binutils.

With newlib installed you need to build the proper gcc (here I am targetting the 603e cpu as default)

1 - cd build-gcc
2 - rm -rf *
3 - rm ../gcc-4.3.0/newlib
4 - ../gcc-4.3.0/configure --target=powerpc-eabi --prefix=/opt/efika --with-newlib --with-gnu-as --with-gnu-ld --disable-nls --with-cpu=603e --enable-long-long
5 - echo “MAKEINFO = :” >> Makefile
6 - make all
7 - sudo make install

The “--with-gnu-as”, “--with-gnu-ld” helps the build process and stops it looking for a different linker/assembler.

The last step is to build the debugger

1 - mkdir build-gdb
2 - ../gdb-6.5/configure --prefix=/opt/efika --target=powerpc-eabi --disable-nls --enable-sim-powerpc --enable-sim-stdio
3 - make all
4 - sudo make install

You should now have a working cross compiler inside of /opt/efika, you may wish to go off and build some packages like glibc or anything else you may want.

Posted by Stu on 07/17 at 12:21 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Wednesday, July 16, 2008

Semi Assembled EFIKA

The last bits of the EFIKA arrived last night, so I coupled up the pico-psu, two leds (hard disk is a nice UV purple, power is green), two switches for reset/power.

Powered it up… mm leds were plugged in back to front, thats an easy fix.

The SmartFirmware was the latest version but, although it listed my USB key in devalias it would not list its contents. grrr. now I have to scrounge around for another usb key to see if it will work. Yay for null modem cables and usb serial adapters.

Some munging of minicom’s config got it to properly send and it all looks good.

I just really need to start making AROS happen

Posted by Stu on 07/16 at 09:23 AM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Tuesday, July 15, 2008

paramstack

I need to rebuild my cross compiler tonight, there is an important powerpc patch I was unaware of, that AROS relies on. It allows control / forces all parameters in gcc to be passed on the stack rather than in registers.

The opposite of __fastcall I guess. Tonight I begin the length process of rebuilding the cross compiler. I may again just try and not use crosstool and build binutils/gcc on my own.

Oh, the pico-psu came today, so I can actually power the efika up.

Right now, the most confusing thing is making heads and tails of the AROS build system. AROS generates and copies a lot of the things it needs, so when it says ‘foo is missing’, and you can clearly see foo in one of the base directories, its hard to know which build rule did/didnt run etc. 

Posted by Stu on 07/15 at 10:25 AM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Saturday, July 12, 2008

It is a _SMALL_ Step

Its a _very_ small step, but I got access to the AROS svn, and modified ‘configure.in’ to add an efika target.

Configure goes ok, and just for the heck of it, with no support code, I’ve told it to go off and ‘make’, hopefully this wont rebuild everything all over again and I can make a skeletonised arch/ppc-efika

mmm well it just died because something about sigcore.h

Well, as I said, its a very small step…

Posted by Stu on 07/12 at 03:52 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed There are no comments on this entry.

Thursday, July 10, 2008

AROS on the EFIKA

So I have this grandoise idea of trying to make AROS work on the efika, as the people who were working on it got busy with life and other things.

So, I have my efika board, all I need now is the PicoPSU to arrive (its on its way).

I spent last night fighting gcc cross compilations. In the end I used crosstool (which I dont like) to build a 603e based system. I originally intended to build by hand but kept running into issues building gcc core (binutils etc all built fine)..

Tonight I guess I will checkout AROS svn and poke around…

So, the plan is to boot efika via TFTP, monitor it with the null modem cable until it looks to be at a point where it is actually working smile and then move the setup to a real VGA screen.

What follows is randon noise and thought dumps;

Build cross compiler
Read up on powerpc arch (things I need to learn)
- BATS / MMU
- low level stuff
- AROS memory layout.

- Pull the elf boot file from tftp
- dump some prom/of info
- check the cpu setup?
- clear/setup the BATS/MMU
- relocate kernel?
- will I need a trampoline from prom/of to the system?
- pci tree probe

Need to read over aros documents. I’m assuming (still) like Amiga, AROS is still non nultitasking and unprotected.

I dont know how cloesly the efika OF is like ‘true’ OF. I know from a lot of posts that on the PegasosI/II it was very buggy. Ive also seen some bug reports on the efika version… I dont know how cloesly it follows this here.

At least freescale have some current docs online here

Looking over the documents, I’m guessing the efika does not have the BestComm UDMA binary firmware in the OF, and we will be stuck with PIO mode… Need to find this ‘bestcomm’ interface info…

Hmm Ethernet is the only thing that really requires the BestComm interface.. which is decsribed in the MPC5200BUM.pdf! nice, I was hoping it was not going to be a black hole.

PowerOff/Reboot/RealTimeClock require an RTAS implementation…

the BUM also has a nice memory map layout

Posted by Stu on 07/10 at 12:47 PM Permalink to this post.
Filed Under : ComputersDevelopmentAROS / EFIKA
Comments are closed Commented on by (2) people. Read those Comments Here


Page 1 of 15 pages  1 2 3 >  Last »