Author Topic: Any 82 programmers around? And questions about ChkFindSym  (Read 4545 times)

0 Members and 1 Guest are viewing this topic.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Any 82 programmers around? And questions about ChkFindSym
« on: October 07, 2012, 12:24:51 am »
I'm trying to port a game from the 82 to the 83/+ but none of the ROM_CALLs are equated (they all use hex addresses). I've found names to most of them in the sng.inc file, but am unsure how some of them relate (or don't) to the 83+. In particular, those around the VAT/memory:
Code: [Select]
DEL_MEM      = $258D ;Deletes a region of allocated memory: HL = address DE = size
DEL_TMP      = $3606 ;Delete temporary use memory region
INSERT_MEM   = $2258 ;Allocates a region of memory: HL = size DE = address
CREATE_TMP   = $38D0 ;Create temporary use memory region
What's the difference between the the MEM and TMP versions? The program is trying to allocate memory for something but it always crashes here. It's using the CREATE_TMP/DEL_TMP routines. There's a little bit of info here:
http://tifreakware.net/tutorials/multi/unification.html#part05
It seems like the program is trying to recopy itself into a new program.. or something along those lines. I haven't had time to look through it too closely yet, but i've noticed in the emulator that after the ChkFindSym it returns the VAT entry for the program in HL, which seems to be correct, but the address in de pointing to the data points to somewhere in  $FEXX. Is it that the shell (zStart) is doing something funny? Because i don't see any data. I'm not too familiar with the memory routines or the structure of the calculator, i think i could just _InsertMem to the end of the program (it's for saved games), but it's such a large program (>22k) but i can't seem to find it in memory! I think in the end i will try to convert it into an app and just use app vars to save the games, but i wanted to try and get things up and running first since i don't feel like trudging through all the complications that would bring (SMC, text routines, multiple pages, etc.) just yet.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #1 on: October 07, 2012, 12:57:26 am »
Mhmm I wonder if tr1p1ea has done 82 stuff. He would probably be the only 82 guy around possibly, since FloppusMaximus is barely around anymore D:. I only did one 82 game and it was a port of a TI-81 RPG.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #2 on: October 07, 2012, 09:26:16 am »
Hmm... Idk, You could maybe ask Brandon W or see if Patrick D knows(he's in IRC sometimes). Not many 82 programmers around anymore I'm afraid. :/ You could *try* getting in touch with Digitan from United TI, but he seems to have vanished. :(

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #3 on: October 07, 2012, 12:17:24 pm »
Yeah, it's his game i'm trying to port (Digitan's), since i've always wanted to play Robot Wars but haven't had an 82 for years. I'll try asking over at MC, i don't know where/how to find Brandon W or PD.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #4 on: October 07, 2012, 02:37:23 pm »
He seemed to have vanished at MC too unfortunatley. D: I tried tracking him down a while back, but all the contact info I had got no response. :( It'd be great to see the original Robot wars ported to the 83+. Myself and others I'm sure are also eagerly awaiting Robot wars II. I really hope he re-appears at some point, or someone is able to track him down. At any rate, best of luck with your port, it's an great choice! :D
« Last Edit: October 07, 2012, 03:34:17 pm by Art_of_camelot »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #5 on: October 07, 2012, 03:21:44 pm »
I wonder if he would allow someone else to take over the project of porting Robot Wars 1 to the 83+? Maybe he wouldn't mind sending the source code to someone else if he was reachable.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #6 on: October 08, 2012, 03:07:20 am »
The source is included in the file on ticalc ;) I think a lot of the basic engine is ready, the interrupt routines seem to be messing with the MENU routine in the battle engine, i'll have to check that out, and saving/loading isn't implemented yet (and since the game is so large, i've had to cut out most of the maps just to test if the engine is working), buuuut once i figure out what the interrupt is doing there shouldn't be much left to do to have a playable demo. It's the first time i've ever played it and i have to say, it's really cool :D It has the "digi" feel, i can see a lot of his humor/style in it.

Oh, and i have to say thanks to Hot_dog for crabcake, which has made testing it out soooo much easier, since i didn't have to worry about swapping code around to get around the 8.8k limit (and there is a loooot of code!).

EDIT: @DJ: did you ever play Robot War?
« Last Edit: October 08, 2012, 03:08:15 am by chickendude »

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #7 on: October 08, 2012, 03:42:36 pm »
Alright, so i've gotten a good amount worked out (or at least it seems that way to me!). There're still a lot of things i haven't tested, i dunno if anyone wants to go through the game and find things that are broken or not. The file is too large to fit into RAM, this file here, after saving, leaves you with around 80 bytes free (more if you delete L1-6). It contains 13 of the 21 maps, which should take you pretty far into the game, and anyway as i figure out how to implement everything (probably by converting it into an app) you'll be able to use your save file. However:

PLEASE DO NOT TRY THIS ON YOUR REAL CALC (or at least don't get upset when it crashes ;))!

It probably wouldn't fit anyway, unless you have no other programs. There are a lot of things i haven't tested yet and while the differences in the code between the 82 and 83+ aren't that great, it's often enough to reset your RAM. For example, the battle routine was stalling because my random number routine never returned a carry and it relied on a random "carry" being thrown for the enemy's AI. CrASH's random routine must've had an srl a/rra at the end, since it says it returns a random number between 0-127. Small things that cause big headaches!

Things i've tested so far:
1. basic tilemap engine
2. basic battle engine (normal attacks and using items)
3. saving/loading is now working, as well as quitting the game (before it gave an error after trying to start the game for a 2nd time)
4. basic events engine

There's probably a lot more that works since i've really had to make very few changes.

Things to do:
1. fix sprites that are messed up when you move.
2. weird sprites drawn on side of screen during battles.

Also please note, this is just the Standard Edition (no link-play...yet). Also, many thanks again to Hot_dog for Crabcake, without which life would've been so much more difficult! Oh, and worth noting just in case: i've been using zStart to run it, but in theory (whatever that means), it should also run under any ion-compatible shell.

Attached are the current source to the 83+ version (with readmes/extra documents provided with the original/the original .82P files) and a .8XP file to test using your favorite emulator :)

EDIT: attached a "short" screenshot to give you an idea where it's at.
« Last Edit: October 08, 2012, 03:51:59 pm by chickendude »

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #8 on: October 08, 2012, 04:37:40 pm »
Awesome! I'm going to be a bit busy today, so I'll try ti give it a run through tomorrow.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #9 on: October 09, 2012, 12:42:11 am »
Cool, thanks :) I also just found that the "mapBuffer" is built into the program, if i move that into saferam it'll open up another 1k of space, which SHOULD be enough to fit the rest of the maps in :D (and still have a solid 2-300 bytes on the BE, maybe 500 or so on the 84+/SE)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #10 on: October 09, 2012, 04:15:19 am »
You're planning to port it? O.O

You should create a project topic so it gets more attention from those not checking ASM help :)

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #11 on: October 09, 2012, 09:25:35 am »
Cool, thanks :) I also just found that the "mapBuffer" is built into the program, if i move that into saferam it'll open up another 1k of space, which SHOULD be enough to fit the rest of the maps in :D (and still have a solid 2-300 bytes on the BE, maybe 500 or so on the 84+/SE)
Hey, that's great! :D

I also agree with DJ. I was going to suggest the same thing myself. :)

*EDIT*
i don't know where/how to find Brandon W or PD.
Both tend to idle in #Omnimaga, and Brandon W has his own website as well. As you mentioned in another thread, Dwedit might know some things too. Don't know how i forgot about him. :P
« Last Edit: October 09, 2012, 10:08:32 am by Art_of_camelot »

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Any 82 programmers around? And questions about ChkFindSym
« Reply #12 on: October 10, 2012, 12:54:21 am »
Cool, i got the majority of the game working (though there are apparently still a few annoying bugs) and started a project thread. I just ignored all of the relocation stuff (and shaved off a couple hundred bytes that way :D) and just wrote something using _CreateProg to store the saved game files, which i think is what he did originally anyway, i'm just not sure what all that relocation/derelocation (haha) was for, but saved files are working fine so i'm not so worried about that now. And the issue with the strange scrolling sprites i think was because CrASH wants all sprites to be in a 256 byte-aligned buffer ($XX00) and that buffer was coincidentally placed somewhere i was already using as saferam. At least after i rearranged everything to fit the map buffer into saferam, those sprites (the NPCs) seem to be fixed.