Did you mean it should be possible to generate an as from the skoolkit files?
Yes, you can generate an assembler-friendly ASM file from the SkoolKit source files for MM or JSW. In fact, that's one of the main points of SkoolKit - you can use the same source files to generate both the HTML disassembly and an ASM file.
You will need to download SkoolKit - for which you'll also need Python, version 3.4 or later - and use skool2asm.py to convert jsw.skool into jsw.asm (for example):
skool2asm.py jsw.skool > jsw.asm
I've successfully tested the output of skool2asm.py with pasmo, SjASMPlus and z80asm (the assembler that comes with z88dk), but it might work with other assemblers too.
It's the instruction which merges a guardian's INK colour and BRIGHT value (Bits 0-2 and 6) with the PAPER colour (Bits 3-5) of its host cells.
No, there's particular reason to use XOR instead of OR here. As you've noted, there's no difference in the resulting value in the A register, and there's also no difference in the effect on the flags (which are not checked anyway).
Posted by SkoolKid
on 06 September 2016 - 06:46 PM
This bug just got more interesting!
I think I know why Willy is relocated further down the rope on your first attempt: in the section of code that handles Willy's movement along the rope, the rope status indicator is reset to 12 if it's found to be 11 or less. How you then manage to circumvent that code in your second attempt, I have no idea yet.
Also, you might be able to answer a query I had a while ago about the area of the 'contended memory' #5B00-5BFF. The 'top end' of it seems to be used for the stack addresses in JSW (starting at #5BFE-FF), but does it have any other use than that? #4000-#57FF is the display file, #5800-#5AFF is the attribute file, and the JSW buffers begin at #5C00 - so 'page' #5B fits in between those.
As far as I know, the printer buffer (5B00-5BFF) is used only by the stack - the stack pointer being 5C00 when the game starts.
Richard, I've just noticed that neither of the two 'Kong Beast' screenshots in the MM disassembly display the Cyan horizontal guardian!?
Also, the comment at #91EE caused me momentary confusion; perhaps it should read: "The Kong Beast is drawn with Yellow Ink when he is falling"?
Regarding the cyan guardians in the Kong Beast caverns: well, well, well! My first thought is that because the third horizontal guardian in those caverns is unused, the fourth one (the cyan one) is erroneously skipped. I will look into it...
Regarding the comment at 91EE: the comment at the beginning of that section of code (at 91A3) says "The Kong Beast is falling", but I suppose you might have forgotten that by the time you reach 91EE.
Just checking in to acknowledge the comments and see what new stuff I should be adding to my MM/JSW disassembly TODO lists!
I've been preoccupied recently with SkoolKit 5.3 and the Spectrum ROM Disassembly, but I'm going to take a break from those and concentrate on MM and JSW for a bit. Now, where were we the last time I was here...
By the way, I hope you don't mind these occasional comments and suggestions? Your disassemblies are fantastic resources, and hugely helpful in gaining an understanding of the code. If I come across as pedantic it's only because I believe that 'tweaks' such as this could help readers who follow after me to gain a similar level of understanding!
No, not at all - keep them coming! I want the disassemblies to be as accurate and comprehensive as possible, and I'm always happy to receive new trivia suggestions and bug reports.
I play files using an online emulator called QAOP.
I just click 'Open' and then browse for a file (sometimes they're .tap files, sometimes .z80).
The emulator seems to go straight to the Title Screen with no bother. Therefore, as far as I am aware, no 'loader' is involved in the process?
I was just wondering how the emulator knows where to begin?
My earlier answer covers snapshots, but for TAP files, there's always a loader, even if it doesn't look like it. Most emulators have the ability to 'fast load' TAP files, which means the USR command in the BASIC loader is executed almost immediately, without you having to wait for the tape to play in real time.
But if I'm running game files on an emulator, with no loader, how does it know to start at #8400?
Are you asking how an emulator knows where to begin execution when loading a snapshot file?
If so, the answer is that the emulator takes the value of the program counter (PC) that is stored in the snapshot file. In a SNA file, PC is stored at the top of the stack (and must be popped off before execution begins). In a Z80 file, PC is stored in the header (like all the other register values). In an SZX snapshot, PC is stored in the ZXSTZ80REGS block (along with all the other register values).
Sorry to be a pain, but I don't think your latest iteration of the 'Through the Wall' entry in your Manic Miner disassembly is quite accurate yet:
I've just read the 'Through the wall' description a few times to get it straight in my head, and I must admit I'm not seeing the discrepancy between the text and the pictures.
When I say that there is a nasty tile below Willy's sprite in step 16, what I mean is that when the nasty tile check is made at the point when the jumping animation counter is 16, Willy's x-coordinate has not yet been updated from what it was in step 15 - at which point there is a nasty tile below Willy's sprite. (His x-coordinate is updated before he's drawn during step 16, though.)
Perhaps the wording doesn't make that clear enough. Would it help if I stated the actual x- and y-coordinate values when the nasty tile check is made?
It's easily checked, especially with that POKE - which incidentally, will set the Screen Flash off (and increment the lives) every time an item is collected! N.B. Care might be needed in case the remaining lives display runs off the edge of the screen and causes corruption elsewhere?
Actually, Willy gets an extra life only when the thousands digit is rolled over from 9 to 0, so that POKE won't give rise to a too-many-lives problem.
Regarding unused code: the table of unused blocks is generated automatically, and I can't add an entry for a section of code/data that's embedded in a block. I could add some intro text to the 'Unused addresses' page that lists such sections, though.
Regarding the item below the portal in The Sixteenth Cavern: after looking at the code, I'm sceptical that Willy doesn't get 100 points for collecting the item - the points are added at the same time as the item is collected. You could try POKE 36739,41 to check this - it would award 100,000 points per item collected, which is more obvious than 100. (Actually, that's a good candidate for the POKEs page.)