Games Exposed

General software. From trouble with the Banyan Tree to OCP Art Studio, post any general software chat here. Could include game challenges...
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: Games Exposed

Post by SkoolKid »

luny wrote: Fri Aug 05, 2022 10:31 am If you use skoolkit, SkoolKid will link to it if you publish it as a webpage.
Now now, while that is true, my position is not as bigoted as you suggest: I'll probably link to it even if you don't use SkoolKit. :P

There's at least one disassembly listed on my Links page that doesn't use SkoolKit. There used to be more, but I removed them because the links went dead.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: Games Exposed

Post by SkoolKid »

Morkin wrote: Fri Aug 05, 2022 9:06 am Dammit, I must have missed it..! :oops: This would be a shame if it's gone AWOL.

If anyone finds it, please post a link..!
Apparently John Elliott disassembled Chaos a long time ago. Anyone know where he is today? (I never knew him.)

Also, if I remember correctly - which I probably don't - @Guesser was working on a disassembly of Chaos a few years back. I don't know if that ever saw the light of day. I don't think I've ever seen it.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Morkin
Bugaboo
Posts: 3277
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Games Exposed

Post by Morkin »

Yep, I swear that a Chaos disassembly has been mentioned a lot but I've never seen one.
My Speccy site: thirdharmoniser.com
User avatar
Sokurah
Manic Miner
Posts: 287
Joined: Tue Nov 14, 2017 10:38 am
Contact:

Re: Games Exposed

Post by Sokurah »

Morkin wrote: Fri Aug 05, 2022 10:25 pm Yep, I swear that a Chaos disassembly has been mentioned a lot but I've never seen one.
Perfect opportunity for someone to do it again and make sure it's released this time ;)
Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation & Sqij.
Twitter: Sokurah
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Games Exposed

Post by Guesser »

I was, along with Szeliga.

We got bogged down in the spells and distracted by other projects. I suppose I ought to stick it on GitHub and let more people pick away at it...
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Games Exposed

Post by RMartins »

https://chaosremakes.fandom.com/wiki/Chaos_Funk

Here they mention:
To ensure that the internal logic was accurate, relevant z80 code was analyzed by Chaos fans and equivalent C code was used to make routines such as spell casting, combat and the spread of growths faithful to the original game. The AI system was however built from scratch and plays a good game with a few quirks.
And I remember talking with Richard Phipps about it.
He also had a few more interesting and nicely implemented games for PC.
An Arkanoid clone, with extras, was one of them "Sunny ..." something, can't remember the name right now.

Unfortunately, "Reflected Games" website, doesn't exist anymore.

But wayback machine is here to the rescue
https://web.archive.org/web/20090905025 ... mes15.html

But since that download isn't working, I searched my email for another one.
https://www.allegro.cc/depot/ChaosFunk/

Now, don't blame me, if you get hooked on Chaos again. :lol:
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Games Exposed

Post by Guesser »

Here we go, since it's not much of a secret any more this is where we got to: https://zxnet.co.uk/spectrum/chaos/index.html

You can pull the source from https://github.com/ZXGuesser/chaos-disassembly

edit: Szeliga had a few other bits partially done, yet to be integrated into the main source, but his server is offline right now.

Edited by PJ at request of @Guesser
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: Games Exposed

Post by luny »

SkoolKid wrote: Fri Aug 05, 2022 9:18 pm Now now, while that is true, my position is not as bigoted as you suggest: I'll probably link to it even if you don't use SkoolKit. :P

There's at least one disassembly listed on my Links page that doesn't use SkoolKit. There used to be more, but I removed them because the links went dead.
Apologies, I stand corrected. :)
I code to live (Job) and I live to code (Retro). One of them has to give!
User avatar
Morkin
Bugaboo
Posts: 3277
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Games Exposed

Post by Morkin »

Guesser wrote: Sat Aug 06, 2022 1:56 pm Here we go, since it's not much of a secret any more this is where we got to: https://zxnet.co.uk/spectrum/chaos/index.html
I like the way you can play the sound effects, e.g. on this page.

Pretty simple but I wouldn't have thought of doing that.
My Speccy site: thirdharmoniser.com
catmeows
Manic Miner
Posts: 718
Joined: Tue May 28, 2019 12:02 pm
Location: Prague

Re: Games Exposed

Post by catmeows »

The biggest surprise to me is the universal beeper fx routine. I always thought Chaos has to have dozen of beeper routines.
Proud owner of Didaktik M
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: Games Exposed

Post by SkoolKid »

Morkin wrote: Mon Aug 08, 2022 10:36 pm I like the way you can play the sound effects, e.g. on this page.

Pretty simple but I wouldn't have thought of doing that.
That's so funny, because one of the main features of SkoolKit 8.7 (currently in development) is...the #AUDIO macro!

I've already got #AUDIO macros lined up for the Skool Daze and Back to Skool disassemblies, and needless to say all my other disassemblies will be getting the #AUDIO treatment in due course.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
equinox
Dynamite Dan
Posts: 1052
Joined: Mon Oct 08, 2018 1:57 am
Location: SE England

Re: Games Exposed

Post by equinox »

SkoolKit is great. I "theoretically" understand asm, in the sense that I know what registers, jumps and interrupts are, and can poke through it with a reference manual, but I can't read it in any fluent way. But the Skoolkit disasms are always a joy to look at.
And Ella says they fit perfectly too. 300 LINES EQUINOX, DO NOT SPAM ON THE FORUM.
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Games Exposed

Post by Guesser »

Morkin wrote: Mon Aug 08, 2022 10:36 pm I like the way you can play the sound effects, e.g. on this page.

Pretty simple but I wouldn't have thought of doing that.
That's all procrastination to put off actually reverse engineering spell code :lol:
Same with the macro generated and spell animationd and data tables!
User avatar
Morkin
Bugaboo
Posts: 3277
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Games Exposed

Post by Morkin »

Guesser wrote: Tue Aug 09, 2022 11:11 am That's all procrastination to put off actually reverse engineering spell code :lol:
Same with the macro generated and spell animationd and data tables!
Haha so it's not just me then.... Stuck on a routine? Go do some graphics... :)

I was quite interested to see:

- how manoeuvre rating affects whether a creature can disengage from combat with an undead creature
- how magic defence affects % protection from lightning, magic bolt etc.
My Speccy site: thirdharmoniser.com
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: Games Exposed

Post by luny »

Morkin wrote: Tue Aug 09, 2022 1:17 pm Haha so it's not just me then.... Stuck on a routine? Go do some graphics... :)

I was quite interested to see:

- how manoeuvre rating affects whether a creature can disengage from combat with an undead creature
- how magic defence affects % protection from lightning, magic bolt etc.
Me too. Or go around and tidy up the text or link names etc.
I code to live (Job) and I live to code (Retro). One of them has to give!
equinox
Dynamite Dan
Posts: 1052
Joined: Mon Oct 08, 2018 1:57 am
Location: SE England

Re: Games Exposed

Post by equinox »

luny wrote: Tue Aug 09, 2022 4:13 pm Me too. Or go around and tidy up the text or link names etc.
I just showed this thread to Elise and she said "is it real, I mean does any of it relate to reality?"
....not....precisely...
"Who is luny? He says they should tidy up. Could we put internet points on vacuuming and make them do it?"
no. obviously not...
or could we?
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: Games Exposed

Post by luny »

equinox wrote: Sat Aug 13, 2022 8:53 am I just showed this thread to Elise and she said "is it real, I mean does any of it relate to reality?"
....not....precisely...
"Who is luny? He says they should tidy up. Could we put internet points on vacuuming and make them do it?"
no. obviously not...
or could we?
:lol:

Tell her, no-one knows who luny is. And I'm only tidying up my own links. :lol:
I code to live (Job) and I live to code (Retro). One of them has to give!
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Games Exposed

Post by RMartins »

Guesser wrote: Sat Aug 06, 2022 1:56 pm Here we go, since it's not much of a secret any more this is where we got to: https://zxnet.co.uk/spectrum/chaos/index.html
I would like to try make a constructive criticism.

Variable names are a bit cryptic.

Some examples:
  • FLA481
  • FRA321
  • NUM
  • LEVEL
  • GAMTUN
  • POSPRI
  • COMPAR
  • SPELNO
  • RANUM
  • ROMP
  • HISPEL
Although for some, we might grasp some idea of what it actually is used for or we can assume.

However, we should avoid cryptic names by making them more clear, but above all, each and every variable name ( even if cryptic, shortened or minimized), MUST have a complete description, so that we can understand what it is used for, what are the units or range of the values being used, etc...

However, I checked each one I posted above, and they have no description associated with them.

If no description is given for each variable, we are forced to look for them in actual code to actually determine what and how they are used for, and that goes against the original idea of actually documenting the code.

NOTE: I have NOT used SchoolKit myself, yet.
But I believe variable, functions, etc.. can each have a description.

Some like "spell successful flag", which as nice name, as simple as it seems to be, needs further description to define which values are used, like:
  • FALSE = 0
  • TRUE = anything else
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Games Exposed

Post by Guesser »

Those names are from the original code, and were a starting point to work out what routines do, that's why they were kept. Where the routine has been worked out they should have a description of what they do (but again it's unfinished so they may not have been added yet!)

Edit: I would say this one is somewhere between the "find all the routines and data" and "work out what the code is doing" steps, so not much if any of the "high level description of how the program works" comments are written (because we were just barely getting to the point where we understand the program flow and what the various map tables are used for)
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Games Exposed

Post by RMartins »

It would be really useful if SchoolKit would produce a similar list for variables usage, specially if it would mark them as READ, WRITE or READ/WRITE in each function they are used.
Used by the routines at routine04, chaos_law_spell, RAISDO, TUR_DO, creature_cast_spell, trees_castles_spell, routine18, dark_power_spell, routine77, routine83 and routine85.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Games Exposed

Post by RMartins »

I also noticed that some of the routines, are already known what they do (or partially at least), but the name of the routines don't yet reflect that.
Routine_04 is a good example of this.
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Games Exposed

Post by Guesser »

RMartins wrote: Sat Aug 13, 2022 1:47 pm I also noticed that some of the routines, are already known what they do, but the name of the routines don't yet reflect that.
Routine_04 is a good example of this.
It does a bunch more mystery stuff via function calls though which will be why it's not been commented yet.
I'll admit we weren't very logical in how we worked on stuff, so there's bits all over in various states of progress, where we just picked random routines or variables to go and look at!
It started out working through the menus and game loop in order of what gets executed, so all the message handling and stuff (the easy bits!) was picked off early on, but all the casting of spells etc is all disconnected random bits that only run based on the game state so it's hard to step through them to see what's going on like the menu loops and so on.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Games Exposed

Post by RMartins »

I have been reading a bit on how to use SkoolKit (now with correct name :) ), and according to the documentation
So the skool file is - from start to finish as you develop it by organising and annotating the code - the common ‘source’ for both the reader-friendly HTML version of the disassembly, and the developer- and assembler-friendly version of the disassembly.
So the git hub repository, should be keeping the skool file instead of the ctl file, since it's the skool file that we are supposed to edit ?

If we ever need to revert back to generate a ctl file, we can use the "skool2ctl.py" script, that will retain all the editing that was done, like mentioned in the documentation home page.
use skool2ctl.py to convert a disassembly back into a control file (with annotations retained)
However, this seems a bit confusing, since apparently the ctl file can keep or maintain the same features of the skool file.

Is there anything we can loose by converting between a ctl and skool file ?
Either going in one direction or the other ("skool2ctl.py" versus "sna2skool.py" ) ?

Can any one clarify this ?
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Games Exposed

Post by Guesser »

RMartins wrote: Sat Aug 13, 2022 6:50 pm So the git hub repository, should be keeping the skool file instead of the ctl file, since it's the skool file that we are supposed to edit ?
See viewtopic.php?t=5781 :D
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Games Exposed

Post by RMartins »

By the way routine_09 clearly seems to be the spell casting chance function, for a CHAOS/LAW spell.
It;
- calls random
- compares with casting_chance
- determines success or failure based on comparison (updates spell_success_flag)
- Updates Law (CH_LAW) based on Spell type (spell_chaos_law)
- returns the new CHAOS/LAW in register A

Suggestion for function name: RollSpellChanceAndUpdateWorldChaosLawState

NOTE: That variable CH_LAW, should probably include CHAOS in the name too.


The MPRINT Routine is missing the BC = coordinates in the input parameter list.
Post Reply