Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: chickendude on October 09, 2012, 09:53:02 am

Title: Robot War 84+
Post by: chickendude on October 09, 2012, 09:53:02 am
EDIT: Updated the download here with the latest version. The port is more or less complete, though i haven't added in linkplay yet (there's no more space in RAM to add it ;) ).

__________________________________________

A couple days ago i decided that i finally wanted to play Robot War. I've been wanting to play it ever since i first heard of it nearly 6 years ago. The main issue wasn't the code (it's very well commented/organized and really easy to follow), it was the SIZE of the program. I've finally gotten the size down enough that it'll fit within the RAM of your calculator (as long as you have no other programs loaded, and you may need to delete L1-6), and thanks to Crabcake you no longer have to worry about RAM clears everytime code past $C000 tries to execute :)

There are still a couple bugs, notably there're some random tiles that get drawn to the screen during the battle engine, and i haven't tested very much. I'd really appreciate if you all could help me look for things that still aren't working, since the main part of the program has been fixed up to run under the 83+. Save files are also working, on the 83+ you'll only be able to fit one in right now (and i had to restructure the data quite a bit just to allow that). Because the 84+/SE version of Crabcake is slightly smaller, i can post an 84+/SE only version which should leave you another couple hundred bytes to play with.

This is just the Standard Edition (no linkplay), eventually it would be best to convert it into an app but i just wanted to throw together a quick playable version first.

Also, please note: i don't recommend putting this on your real calc, for a couple reasons. 1) it's largely untested and it's possible (very likely) that at some point it will crash. 2) you probably won't have enough memory (RAM) to fit it on there ;)

And if anyone knew how to get in touch with DigiTan, i'd be very grateful as well.

Screenie:
(http://www.omnimaga.org/index.php?action=dlattach;topic=14565.0;attach=13807;image)
Title: Re: Robot War 83+
Post by: deeph on October 09, 2012, 12:46:59 pm
This is great, I too was waiting for this for years now. I even remember trying to launch it on my 84+SE through emu8x :D

Here are the things I've noticed so far :

- When you walk into the thing to repair your team if you push 2nd it shows the message several times ;
- There are no graphical bugs oncalc during battles (rom 2.53MP) but trees tops are drawed under the character, is this normal ? Some npc are not displayed right when moving (the target game's owner) ;
- If I dismiss the target game it says "Edgar rank up!!!" ;
- Quitting the game kinds of uninstall Noshell's hook (but not the AppVar), no matter if it's during battles or not ;

And this game is really hard I've collapsed right after the first battle :D

Can't wait to play the final version (will you port the linkplay too, btw ?) :)

edit : looks like killing a spy when there's another one who has rejoined him kills them both but then the calc resets :/
Title: Re: Robot War 83+
Post by: chickendude on October 09, 2012, 04:48:31 pm
Cool, thanks. There are a few graphical bugs i've noticed, namely some of the NPCs have some weird pixels stretched over them when you move. After rearrange a bunch of the graphics around and changing where the sprites get copied to for CrASHman's tilemap routine, they seemed to disappear. I'll look into that later as at least it doesn't crash the game.

Yeah, it starts off really hard. It takes a while before you can wander too far from your home. If you want, i can give you a version starting with better stats just to test it out (or you can do it yourself changing a couple values in the source ;)).

I just saw the bug where it kills both the spies (i hadn't actually had a spy call another spy before, they always called other enforcers), however my calc didn't reset :/ I'll try to look into that tomorrow.

Regarding Noshell, i have no idea. It's possible i'm overwriting something somewhere since i've moved a LOT of data out of the program into "saferam". I've been using zStart and haven't had any problems so far.

And i think it's supposed to look like Edgar's walking behind the treetops. Does it not look like that to you?

I also didn't realize that you had to press 2nd twice to get past the "team repaired" text, i'll look into that as well, thanks! And i also saw the "Edgar rank up!!" thing, i thought it was a kind of weird thing to say... I've never played the original so i'm not sure how a lot of stuff's supposed to work, but i think you're right, that's probably not supposed to happen...

I can't say if i will port the linkplay or not. I'd really like to, but i know very little about it and have no way of testing it outside of emulators. I don't know if it's much different between the 82/83+, but it won't be until the Standard Edition is running stable. In the end, it'll probably have to end up as an app so will have a little more room to work with.

Anyway, thanks a lot for the feedback, especially the bit about the two spies! Btw, have you done the tournament yet?
Title: Re: Robot War 83+
Post by: deeph on October 09, 2012, 05:20:31 pm
Quote
Btw, have you done the tournament yet?
My calc crashed just before (due to the two spies)... So yes, a modified version with almost-invincibles robots would be great for debugging.

Quote
And i think it's supposed to look like Edgar's walking behind the treetops. Does it not look like that to you?
Well, head and body pixels should be hidden, no ?
(http://www.mirari.fr/HCGS)
Anyway that's not important, I was just wondering if it was a bug.
Title: Re: Robot War 83+
Post by: Yeong on October 09, 2012, 06:01:00 pm
Nice. An rpg game :D
Title: Re: Robot War 83+
Post by: chickendude on October 10, 2012, 01:03:25 am
Well, head and body pixels should be hidden, no ?
(http://www.mirari.fr/HCGS)
Anyway that's not important, I was just wondering if it was a bug.
Ideally, yeah, but that would make the engine a lot more complex (and involve extra sprite masks) so i assume that's how it was in the original. Maybe you are really climbing across the trees? ;)

Also, deeph: check your pms.
Title: Re: Robot War 83+
Post by: chickendude on November 08, 2014, 12:47:28 am
Bump. I did an extra bit of work on this the past couple days after seeing DigiTan come back over at Cemetech. I'm not sure if there are any things that still need to be ported over or not, i fixed a bug when building robots and think i've finally sorted out the display glitch in the battle routine (i think ionFastCopy was getting interrupted by the interrupt). I'd appreciate it if anyone could play through it and find bugs or spots that just don't seem quite right. I can give you a save file with a more powerful robot if that'll make testing easier (though the game might not be as much fun ;) ). I'm hesitating to say that it's finished though until i finish playing through the whole game.

I also haven't touched the linkplay code, once i make sure that this is basically bug-free i can work on adding that in. But that reminds me, you'll have to have a lot of RAM free on your calc to run this (the latest version takes up 24026 bytes + 183 bytes for the save file).

EDIT: Also, don't forget to read the Readme (http://www.ticalc.org/cgi-bin/zipview?82/asm/games/crash/rw.zip;RW/Robot%20War%20Players%20Guide.txt). I highly recommend that you read it, it explains a lot of things that aren't really self-evident, in particular the part on the battle system.

EDIT: I also just remembered that since it uses Crabcake it won't work on the 83+, just the 84+ and SE editions.

EDIT: Alright, i just beat the game on my SE. There might be a few small bugs, but hopefully nothing too serious. I also fixed a couple things from the original, like spelling mistakes and i added a call to prevent you from jumping back into the enter town dialog if you say no. I've updated the attached files. There were a few other things i wanted to do, too, like let you buy/sell more than one item at a time, but it's already a tight fit as it is. You'll have to delete pretty much everything (minus apps) from your calc to play it.

I'd appreciate it if someone else could play through it and see if there are any bugs. There are a couple small things that i think were in the original, for example i picked up three sets of FINS and when you enter a map you always start at the same place (so when exiting a house, you won't reappear outside the house's door), but it doesn't really affect gameplay any.
Title: Re: Robot War 83+
Post by: DJ Omnimaga on November 09, 2014, 03:47:10 am
I'M unsure about how I did miss this before, but seeing the topic start date, this looks like this was during that period where I was pretty inactive. >.<

Anyway now that I saw it I am glad to see that you have taken over this project. I remember that Digitan wanted to do a Flash APP version but then he disappeared until recently. It was one of the best game ever made for the 82, which I unfortunately couldn't run on a real calculator, so I'm glad I'll be able to do so on my 84+ soon. I'll give this version a try when I have some spare time. :)


EDIT: By the way, have you considered using Fullrene instead of Crabcake? Perhaps it might work on every model?
Title: Re: Robot War 84+
Post by: chickendude on November 09, 2014, 04:25:49 am
Actually, i think the latest zStart for the 83+ let's you bypass the 8k limit, so you could use zStart to run it on the 83+. Crabcake is supposed to work for the 83+, too, but i've never gotten it to work. I'll look into it next weekend and see if i can find anything.
Title: Re: Robot War 84+
Post by: Sorunome on November 09, 2014, 05:20:40 am
Not only the latest but also some zstart versions before.
Also, if it gets too large, why not do the jump to an app?
Title: Re: Robot War 84+
Post by: Geekboy1011 on November 09, 2014, 12:14:36 pm
If those sources are up to date i can help look at breaking this apart into an application for you. Should be pretty easy supposing he does not SMC much. The most complicated part would be figuring out what to branch over to the second page of the application.
Title: Re: Robot War 84+
Post by: DrDnar on November 09, 2014, 02:57:04 pm
You could just _InsertMem on 9D95 like the OS does when running a program and copy the second page over into RAM, so that all the code is in the same physical address space. (And, of course, require about 8 K of free RAM to execute.)
Title: Re: Robot War 84+
Post by: Geekboy1011 on November 09, 2014, 03:15:18 pm
You could just _InsertMem on 9D95 like the OS does when running a program and copy the second page over into RAM, so that all the code is in the same physical address space. (And, of course, require about 8 K of free RAM to execute.)

If i were to help port it i would rather make it be a proper multipage app instead of a hack >.> but thats just me
Title: Re: Robot War 84+
Post by: DJ Omnimaga on November 10, 2014, 12:09:41 am
Actually, i think the latest zStart for the 83+ let's you bypass the 8k limit, so you could use zStart to run it on the 83+. Crabcake is supposed to work for the 83+, too, but i've never gotten it to work. I'll look into it next weekend and see if i can find anything.
Ah I see now. I guess I am not surprised that zStart would do it, because it's the same person that found out about the exploit allowing you to manually get rid of the 8 KB limit and who also made Fullrene. It's good that it does it automatically too. As for Crabcake I guess the reason why it doesn't work on the 83+ is probably due to extra RAM pages being involved.

I wonder if Doors CS7 lets you circumvent the 8K code limit? That said, I agree that Robot War should probably be made into a Flash APP so that you don't have to cut down TI-82 game features in order to fit the 8xp in RAM. It could be made into a 32 KB APP. I don't know how hard converting it to an APP would be, though.
Title: Re: Robot War 84+
Post by: Geekboy1011 on November 10, 2014, 12:11:38 am
If the Smc work is minimal very very easy. its just extracting routines and moving them to the second page and dropping in a branch table Just more time consuming then anything
Title: Re: Robot War 84+
Post by: DJ Omnimaga on November 10, 2014, 12:13:10 am
Yeah my main worry was about having to switch between pages and stuff and figuring out where to put what. For a brand new game I assume it's not that hard once you know ASM, but to port a 8xp game larger than an APP page into an actual APP I would wish him or you good luck >.<
Title: Re: Robot War 84+
Post by: chickendude on November 10, 2014, 02:46:53 am
Yeah, there is a bit of SMC in there (DigiTan called it "polymorph") and yes, the attached sources (in the first post and in reply #6) are the latest sources. CrASH_Man's tilemapper also uses a bit of SMC. I started work on converting it over to an app a while ago, but i'm not sure where those sources went. If someone else wanted to pick up on that, that'd be great. Then i could start working on the multiplayer stuff.

EDIT: I just popped the code from Fullrene in and now it works just fine on the 83+ in TilEm2, gonna load it up on my 83+BE now. It's also much smaller now :D Just loaded onto my 83+ and it works fine except for exiting gives a RAM clear :/

EDIT: Here's a modified version that works for all calcs, though for the 83+ series i think it leaves >$C000 execution open (it checks if the calc is an 83+, if it is it just quits and doesn't reset the protection). Source and 8xp included. It's also over 200 bytes smaller than the previous Crabcake-based version, so it should be a bit easier to fit on your calc.
Title: Re: Robot War 84+
Post by: Geekboy1011 on November 13, 2014, 05:12:30 pm
I Am more then willing I asked a question on Cemetech's Thread. Mind cross posting when you respond to it ^^ thanks

(Question was how big is just the map data)
Title: Re: Robot War 84+
Post by: chickendude on November 13, 2014, 08:56:07 pm
I just moved stuff around a bit and it looks like the code is around 14600 bytes (actually a little less, but moving some of the tables out of the battle routine might be more trouble than it's worth). The map data itself isn't huge, but with the sprites, text, and enemy data it's a bit more.