Just to kind of throw this idea into the pot here...
If anyone wants a Windows-based GUI Cybernoid editor, I'd be more than happy to get to grips with it in a similar manner to my RBR editor. Mr. Anonymous knows what I'm like at this sort of thing :-)
There's been some excellent detective work here, I'd be interested in using it.
That would be superb as well as there are plenty of people without windows so both editors would complement each other nicely. However, not that it's got anything to do with me anyway, I wouldn't like to see anything released by anybody else until after 48k has gotten to the end of this as that would be bad manners. The progress he is making is exceptional and I'd like to see it all come to fruition.
Two heads are better than one though so perhaps 48k and Big 'D' can knuckle down together sharing their trials and tribulations.
My first 6 screen 1 level demo here. 1st screen is borrowed from original game. Cybernoid Demo Demo Map
I need to change the start and finish screens a bit, but quite pleased so far. Its very tiring doing this by hand.
I can`t seem to change the jewel amount thats needed. I want to lower it from 1500 to 1000.
Frank, I just played your demo. It is very good - and you have real commitment to persevere without a graphical editor. I hope to get my editor in a functional form by the end of this week, so if you want to wait for it before you go on, I think it will help. Although I was kind of hoping I'd get to play with it for a while before anybody else arrived...
Anyway, I'm intending to keep all the screens in memory in an uncompressed format, allowing edits and such like. Then compress them into the Cybernoid format after all edits are complete. The resulting data block will have to be exported and patched into Cybernoid manually.
My only worry is that without some machine code routines, it is going to be a little S L O W at doing everything I would like it to. So, ultimately I may try patching in some simple asm code to speed up the display of tiles etc.
p.s. In all honesty, much as I am thrilled by your enjoyment of being able to create a modified Cybernoid game of your own, I can't help but feel my original idea has been usurped. ::shrug:: not sure if that makes me arrogant, naive, or just plain stupid.
p.s. In all honesty, much as I am thrilled by your enjoyment of being able to create a modified Cybernoid game of your own, I can't help but feel my original idea has been usurped. ::shrug:: not sure if that makes me arrogant, naive, or just plain stupid.
Well, given that you're one of those "Mac" people, you'll not be able to use any editor that I come up with without some mucking around with some sort of windows-simulation layer malarky. So your editor will still be the best thing for you to use.
My only worry is that without some machine code routines, it is going to be a little S L O W at doing everything I would like it to. So, ultimately I may try patching in some simple asm code to speed up the display of tiles etc.
How are you drawing tiles at the moment?
Myself, I'd probably convert the graphics into UDGs (would involve a lengthy "please wait" message, or you could include them as a CODE block in your editor's tape image in pre-converted format) and then point CHARS at whichever graphic you want to display - followed by one line of ' !' and the next as '"#' which would draw your graphics pretty quickly. You'd have to re-convert the graphics back to Cybernoid format when you save for modding a Cybernoid snap with, though.
moving the highlight around would be easy - just invert the attrs of the four characters under your cursor, and again when you move away from that space to un-highlight it.
In all honesty, much as I am thrilled by your enjoyment of being able to create a modified Cybernoid game of your own, I can't help but feel my original idea has been usurped. ::shrug:: not sure if that makes me arrogant, naive, or just plain stupid.
Sorry, just got carried away. The time it took me to do 4 and a half screens was considerable. I was just working out a demo to spot anything else that may need editing for playability value, like the amount of cargo thats needed is too much for a small level. Also, it doesn`t matter where you place the aliens that enter from the edge of screen, you can put the code anywhere in a space on the screen as it doesn`t effect the position of the aliens. Anyway, I`d never have the time or patience to do a complete game.
One of the feelings I had whilst making the demo was that I`d like different graphics. There are more than enough tiles to edit for the walls, was thinking of a different look for each level or area, like rocks/volcanos, stone/pipes, metal/scaffold etc. The only problem I have is not sure how to change the colours/attributes assigned to each tile. I tried some Cybernoid 2 graphics but they were the Cybernoid 1 colours.
I didn`t want to usurp, just help. But i did enjoy myself too, something i would have loved to do when i first played this to death on my speccy as a kid.
The only problem I have is not sure how to change the colours/attributes assigned to each tile.
The colour table is at #E9B9 for graphic code 0. If you place a bp at #727C and follow the call to #A57F through it will show you how it does it. Then it's just a case of adding 4 for each successive graphic.
Graphic 1 attributes are therefore at #E9BD, #E9BE, #E9BF and #E9C0.
(change the above locations to say #44,#45,#46 and #47 before a game starts will show (yukkily) how it's done)
Thanks Mr Anonymous, your a genius with this stuff.
How about this one.
I changed the jewel amount to 500, on successful collection of 550 I get 5500 bonus points and an extra life. However after this, the last character of the running score gets corrupted, even in the high score table. If i don`t get over 500 jewels the score doesn`t corrupt. It does it on succesful jewel collection of any amount.
Sorry, just got carried away. The time it took me to do 4 and a half screens was considerable. I was just working out a demo to spot anything else that may need editing for playability value, like the amount of cargo thats needed is too much for a small level. Also, it doesn`t matter where you place the aliens that enter from the edge of screen, you can put the code anywhere in a space on the screen as it doesn`t effect the position of the aliens. Anyway, I`d never have the time or patience to do a complete game.
One of the feelings I had whilst making the demo was that I`d like different graphics. There are more than enough tiles to edit for the walls, was thinking of a different look for each level or area, like rocks/volcanos, stone/pipes, metal/scaffold etc. The only problem I have is not sure how to change the colours/attributes assigned to each tile. I tried some Cybernoid 2 graphics but they were the Cybernoid 1 colours.
I didn`t want to usurp, just help. But i did enjoy myself too, something i would have loved to do when i first played this to death on my speccy as a kid.
Hey, Frank. I think I have some explaining to do...sorry if my comment came across a bit harshly. I guess I was just a bit pissed that I was bothering to spend time writing the editor for more general use, when I could have just spent my time manually altering the codes to make a new game as you did. I agree that the access to an editor 20 years ago would have been awesome. For many games I would have paid good money for one. Your code-breaking has been extremely helpful by the way, so sorry if I came across as dismissive.
Regarding the graphics and attributes: I think Mr.A has explained it above, but you'll find 170x16bytes for the graphics tiles at $D479. Format is L>R then Top>Bottom for each tile. The attribute data is directly after this, starting at $E9B9, and is 170x4 bytes long. Format is also L>R then Top>Bottom.
It should be easy to use a graphics editor similar to SevenUp to import, modify, and export the graphics into the correct format for patching.
moving the highlight around would be easy - just invert the attrs of the four characters under your cursor, and again when you move away from that space to un-highlight it.
I'm already doing that. I was very pleased when I got it to work. I'm using PEEK and POKE. I PEEK the attribute, subtract it from 127, and POKE it back.
How are you drawing tiles at the moment?
Myself, I'd probably convert the graphics into UDGs (would involve a lengthy "please wait" message, or you could include them as a CODE block in your editor's tape image in pre-converted format) and then point CHARS at whichever graphic you want to display - followed by one line of ' !' and the next as '"#' which would draw your graphics pretty quickly. You'd have to re-convert the graphics back to Cybernoid format when you save for modding a Cybernoid snap with, though.
Dunny, how many UDGs are available? I am doing a combination of what you suggest, I think.
The current graphics blocks at the bottom of the screen are POKED there directly from the memory location (PEEK and POKE again). This is what is V E R Y S L O W since each tile requires 32 PEEKs and 32 POKEs, and there are 16 of them. I thought I had to use POKE in order to get things displayed in row 22 and 23 of the display.
Entering tiles into the screen are a hybrid since working out screen coordnates as direct POKEs is somewhat painful. Instead, I POKE the relevant tile data into 4 UDGs (A,B,C,D), Then PRINT them in the correct location.
I display the attributes by direct POKE, becuase attribute coordinates can be easily calculated directly x,y cursor coordinates by adding them by:
POKE (22528+x)+(y*32), newattr1. etc.
Can you explain more the idea of pointing CHARS? I don't quite follow. Can I point it to the memory area containing the graphics? What does ! and # do? Cheers.
Thanks Mr Anonymous, your a genius with this stuff.
How about this one.
I changed the jewel amount to 500, on successful collection of 550 I get 5500 bonus points and an extra life. However after this, the last character of the running score gets corrupted, even in the high score table. If i don`t get over 500 jewels the score doesn`t corrupt. It does it on succesful jewel collection of any amount.
This happens on the unmodified Cybernoid game too.
In case you are interested, the bytes for the alphabet/numbers etc are held directly after the screen data ($A5AA to $C3F0). It starts at $C3F1, and continues right through to $C6F8, I think.
But it seems that this is not the area being corrupted. It must instead be the last byte of the string that holds the score.
Can you explain more the idea of pointing CHARS? I don't quite follow. Can I point it to the memory area containing the graphics? What does ! and # do? Cheers.
Ok - if you think about it, the Speccy has to get its character set (the alphabet and symbols) from somewhere when you PRINT text to the screen. It does this by assuming that the Space character is 0, the ! is 1, the " is 2, the # is 3 etc... following the character set detailed in the manual.
This number is multiplied by 8, and added to the number held in the CHARS system variable. Then 8 bytes are read out and poked to the screen memory by the PRINT routine. Just like a UDG!
So by pointing CHARS to some other area of memory (your choice where) you can have up to 96 defineable characters as well as your 21 UDGs. When the PRINT routine outputs text it grabs them from your graphics.
Unfortunately, the Cybernoid graphics are in 2x16 format, so you'll have to convert them to character (UDG, or 1x8) format for this to work.
So, I guess that means I'm arrogant, naive, and plain stupid :D;)
Nah, I'm interested in a BASIC solution. Any old idiot can use a powerful modern PC to write an editor, but it will take some real magic to get one out of Sinclair BASIC. Get to it, man!
Great stuff, Dunny. I've been playing with the CHARS variable, and I reformatted the Cybernoid data (using BASIC :)).
But now I am stuck because previously I was POKING the graphics into the bottom two rows of the screen. Is there a way to PRINT there? If not, this has been a bit of a wasted effort :-(
I tried playing with the DF SZ variable, but that doesn't seem to be what I thought it was from the description in the Sinclair manual.
How about this one.
I changed the jewel amount to 500, on successful collection of 550 I get 5500 bonus points and an extra life. However after this, the last character of the running score gets corrupted, even in the high score table. If i don`t get over 500 jewels the score doesn`t corrupt. It does it on succesful jewel collection of any amount.
Yeah, its bugfixed now. I finished off my demo with unedited graphics for now. I`m still not happy with the end of level screen. Demo Map V2 Cybernoid Demo V2 Snapshot.
I`ve been busy getting the graphics and attributes all labelled in my source code. So I can chop and change things easier. Also wiped the default map and tables area in my snaphot.
I`ve been hacking at Cybernoid 2. This is what I`ve found so far.
Graphics
Start 52683
Length 7232 bytes
Divided by 32 for each tile = 226 tiles
Attributes
Start 59915
Length 904 bytes
Divided by 4 for each tile = 226 tiles
Some more hacking and setting a bp at $6FB2, check HL for map data address on each screen. Using a map of level 1, I worked out that the 5th screen as played(04 below), is the top left screen and therefore the start of the map data.
Room map address
00 A732
01 A970
02 A8FB
03 A6D0
04 A4D9 ; top left
05 A541
Map Data
Start $A4D9
Length 5946 bytes ($173A)
Possibly 256 more bytes available for map data as the area is filled with 00 at end of map.
Even more hacking and found the map table. 58 screens.
Map Table
Start $6E77
Length 116 bytes ($74)
Lots more to do yet.
EDIT:
Map data is slightly different than cybernoid 1 in that it has an extra compression type. e.g.
E3, 05, 12, 13, 14, 12
This is an entire horizontal line of 16 tiles. E3 05 repeats the next 3 tiles(12,13,14) 05 times.
So we have E3 and FF to use for space saving. E2 does something as well.! E2 05 will repeat the next 2 tiles 5 times.
Found the Levels Tables at $7219, 8 bytes per level, same format as Cybernoid 1, except 4 levels. 1st 2 bytes are start position, 3rd byte is width of map in screens, 4th byte is starting screen, 5th and 6th are timer, 7th is ship orientation as before.
How do I go about finding the music and sound fx routines/data for Cybernoid 1 or 2?
The only thing I can`t find is where Cybernoid 2 checks for the amount of levels?
I`ve had an idea of converting the Cybernoid 2 maps to Cybernoid 1 format. I`ve written a basic program that uncompresses the map data, so I have all the map data uncompressed. I need to patch the uncompressed data so that no more than 170 tiles are used for drawing to screen, then patch the Cybernoid 1 graphics with the Cybernoid 2 graphics.
Not sure how to write a program to compress the data in Cybernoid 1 format, which if it finds 4 or more of the same bytes to write FF 04 ??.
I`ve had an idea of converting the Cybernoid 2 maps to Cybernoid 1 format. I`ve written a basic program that uncompresses the map data, so I have all the map data uncompressed. I need to patch the uncompressed data so that no more than 170 tiles are used for drawing to screen, then patch the Cybernoid 1 graphics with the Cybernoid 2 graphics.
Not sure how to write a program to compress the data in Cybernoid 1 format, which if it finds 4 or more of the same bytes to write FF 04 ??.
Wow! That is a lot of decoding, Frank! I've been off the forums for a day or two after the wireless network I hijack disappeared. They must have just upgraded the router or something because connection speed is now superb! :D
Part of my cybernoid editor compresses uncompressed bytes into the compressed format, but only in a screen by screen basis for now. I'm hoping to upgrade it soon.
It is a simple case of looking ahead and comparing the bytes, and incrementing a subcount for as many times as they are the same.
Here is the BASIC - it's probably pretty crumby compared to what the pros can offer :-):
5000 REM compress map data
5010 LET scr=42410: REM $A5AA
5020 LET ct=0
5030 LET dpos=0
5040 LET c1=PEEK (scrdata+dpos)
5050 LET c2=PEEK (scrdata+dpos+1)
5060 LET c3=PEEK (scrdata+dpos+2)
5065 PRINT AT 21,6; dpos; AT 21,10; ct
5070 IF c1=c2 AND c1=c3 THEN GO TO 5100
5080 POKE (scr+ct), c1
5090 LET ct=ct+1 : LET dpos=dpos+1
5095 IF dpos=160 THEN STOP
5097 GO TO 5040
5100 REM >=3 codes are same
5102 LET dpos=dpos+3: LET sbct=3
5104 LET c4=PEEK (scrdata+dpos)
5106 IF c4<>c1 THEN GO TO 5200
5108 LET dpos=dpos+1
5115 LET sbct=sbct+1
5116 IF dpos=160 THEN LET dpos=dpos-1: GO TO 5170
5118 PRINT AT 21,6; dpos; AT 21,10; ct; AT 21,14; sbct
5119 GO TO 5104
5170 REM End of screen
5200 REM no longer the same code
5210 POKE (scr+ct), 255
5220 POKE (scr+ct+1), sbct
5230 POKE (scr+ct+2), c1
5240 LET ct=ct+3
5247 PRINT AT 21,6; dpos; AT 21,10; ct; AT 21,14; sbct
5248 IF dpos=159 THEN STOP
5250 GO TO 5040
scr is the area where cybernoid gets its screens from (A5AA).
scrdata is the area where the uncompressed cybernoid screen data is stored - just a linear sequence of 160 bytes for each screen. I have them stored temporarily at 50944 ($C700)
dpos is just a byte counter through the uncompressed screen bytes.
ct is the compressed byte total.
sbct is the temporary count for compressed (FF)bytes.
The PRINTs are there just to monitor it.
Enjoy! I'm getting closer and closer to a useable editor :-)
Edit: Frank, I notice that Cybernoid2 uses 24x16 for some tiles (the ones with the lifts). How did you get around this problem when you uncompressed the data? Or are these in fact 16x16 in two columns, with part that you can fly through? I'm suddenly realising that it must be the latter - so probs ignore this edit :-) d'oh!
Edit 2: Well the compressor just failed to STOP. So it needs work. It must be due to incrementing dpos +3 close to the end of the screen, causing it to skip 159/160. I'll get on it.
Part of my cybernoid editor compresses uncompressed bytes into the compressed format, but only in a screen by screen basis for now. I'm hoping to upgrade it soon.
Screen by screen is ok, as I need to add each screen individually, so that I can label each one for the map table.
Well the compressor just failed to STOP. So it needs work. It must be due to incrementing dpos +3 close to the end of the screen, causing it to skip 159/160. I'll get on it.
Thanks, it works better than my efforts!
The main problem with converting the cybernoid 2 map is the enemies, I have to work out all the enemy codes, then I can just poke 00 for the horizontal moving enemies. Maybe write a program to convert most other enemies to Cybernoid 1 format. e.g. peek and poke.
Edit:
I`ve edited the program above with;
5061 LET c4=PEEK (scrdata+dpos+3)
5070 IF c1=c2 AND c1=c3 AND c1=c4 THEN GO TO 5100
This is because it was writing FF 03 00, its best to have just 00 00 00.
I`m having a hard time converting the maps, I`m having to peek and poke all the animated tiles and enemy tiles below E9, guns etc. But I`m going to have to move the graphics locations around for it to look right with the Cybernoid 2 graphics, because the scenery is shooting at me! And too many guns on the screen make it crash.
If you add the following line, it works without the potential to run on.
5067 IF dpos>156 THEN GO TO 5080
Also, it is worth moving the PRINT statement in line 5065 to 5092.
When it STOPs, the correct value of ct (compressed byte length of screen) will now be displayed.
Hopefully, I'm only a few days away from a "finished" version of the editor.
Here is a screenshot of the latest version, complete with ripped Cybernoid font :).
Looks good. One thing though is that some tiles are just animation frames, these needn`t be displayed as a tile to put on the screen, just the first frame. Some are just animation frames of the enemies/items from E9 to FE. Looking forward to trying it out though.
Cybernoid 1 and 2 enemy codes (EC-FE) are the same except for these extras in Cybernoid 2.
; E4 = RIGHT DUO ENEMY 6.00 GAP
; E5 = RIGHT DUO ENEMY 5.66 GAP
; E6 = RIGHT DUO ENEMY 5.33 GAP
; E7 = RIGHT DUO ENEMY 5.00 GAP
; E8 = LEFT DUO ENEMY 6.00 GAP
; E9 = LEFT DUO ENEMY 5.66 GAP
; EA = LEFT DUO ENEMY 5.33 GAP
; EB = LEFT DUO ENEMY 5.00 GAP
Looks good. One thing though is that some tiles are just animation frames, these needn`t be displayed as a tile to put on the screen, just the first frame. Some are just animation frames of the enemies/items from E9 to FE. Looking forward to trying it out though.
Thanks. Yes, I've thought a lot about the animation frames. Problem is that it will make coding the editor significantly more complex to remove them and yet maintain correct code entry into the map editor space (due to the way the program is coded). The easiest route would be a lookup table so that it PEEKs to see what the correct code to insert is. I'll have a look to see if it is worthwhile.
Actually this idea has piqued my interest. I could rearrange some of the graphics so that similar ones are closer to one another (e.g. all the tentacles, corners, pillars, etc). I need to create appropriate graphics to represent the special codes E9 to FE anyway.
Only problem I foresee is that it would not be easy to import modified graphics into the editor without a very complicated routine.
How do I go about finding the music and sound fx routines/data for Cybernoid 1 or 2?
Cybernoid 1
=========
48K mode
========
you can set a bp at #85E2. HL now points to your sound ditty. Trace it through to see what it's doing. If you just want to alter the sounds then you can play with the values. Two instructions up from #85E2 you will see the table start at #8710. As far as I can tell the routines are :-
#8710 ?
#8718 fire bomb
#8720 ? (can you fill these in, I'm not a big fan of Cybernoid)
#8728 ship hit,enemy hit
#8730 fire bullet
To trace the tune set bp's at #654E, #81BE and #FBD6 *then* load the game and again trace through. At #81BF you will see HL loaded with the table base for the first run namely #FC4E.
#FB86 LD HL, #FC4E ; Tune starts here
(Break on #81BF and change to LD HL,#2000 at #FB86 ouch! - it will revert correctly after a minute or so due to below)
At #FBDC is the initialization of the second and subsequent plays.
128k mode
=========
Set a bp at #EFD1 to catch the tune and effects.
#EFCD LD HL, #F28E_table_start
Tune will be shown as it plays. It will keep breaking after so many notes are played.
A quick play reveals
#FA32 bomb (you need a bp at #7C97 to trap this one and trace thro')
#FA3C pick up bonus
#FA46 shot
#FA56 crash
#FA96 first hit off enemy
#FAA6 treasure
but I can only get to about screen 3 before I snuff it so again, fill the gaps. Be sure to wear stereo headphones when playing with the values then report back with a list of all the quavers, crotchets and semibreves :)
The routines I suspect will be similar in Cyber2 so just search for the same bytes around where you're breaking above.
The only thing I can`t find is where Cybernoid 2 checks for the amount of levels?
Have you done this now? Can't fathom what you mean.
Comments
If anyone wants a Windows-based GUI Cybernoid editor, I'd be more than happy to get to grips with it in a similar manner to my RBR editor. Mr. Anonymous knows what I'm like at this sort of thing :-)
There's been some excellent detective work here, I'd be interested in using it.
Ideas?
D.
My ZX Art Music Page
Carlos Michelis Theme
Indeed. Not bad I s'pose :p
That would be superb as well as there are plenty of people without windows so both editors would complement each other nicely. However, not that it's got anything to do with me anyway, I wouldn't like to see anything released by anybody else until after 48k has gotten to the end of this as that would be bad manners. The progress he is making is exceptional and I'd like to see it all come to fruition.
Two heads are better than one though so perhaps 48k and Big 'D' can knuckle down together sharing their trials and tribulations.
It would indeed. I'll hang on, and then have a bash at a Win32 version - might even end up being able to re-do the entire game (gfx and all).
D.
Source here.
My ZX Art Music Page
Carlos Michelis Theme
As an aside, I've lost my disassembled Cybernoid so I'm starting again though don't hold your breath for anything soon or at all...
Cybernoid Demo
Demo Map
I need to change the start and finish screens a bit, but quite pleased so far. Its very tiring doing this by hand.
I can`t seem to change the jewel amount thats needed. I want to lower it from 1500 to 1000.
My ZX Art Music Page
Carlos Michelis Theme
Anyway, I'm intending to keep all the screens in memory in an uncompressed format, allowing edits and such like. Then compress them into the Cybernoid format after all edits are complete. The resulting data block will have to be exported and patched into Cybernoid manually.
My only worry is that without some machine code routines, it is going to be a little S L O W at doing everything I would like it to. So, ultimately I may try patching in some simple asm code to speed up the display of tiles etc.
p.s. In all honesty, much as I am thrilled by your enjoyment of being able to create a modified Cybernoid game of your own, I can't help but feel my original idea has been usurped. ::shrug:: not sure if that makes me arrogant, naive, or just plain stupid.
Well, given that you're one of those "Mac" people, you'll not be able to use any editor that I come up with without some mucking around with some sort of windows-simulation layer malarky. So your editor will still be the best thing for you to use.
D.
How are you drawing tiles at the moment?
Myself, I'd probably convert the graphics into UDGs (would involve a lengthy "please wait" message, or you could include them as a CODE block in your editor's tape image in pre-converted format) and then point CHARS at whichever graphic you want to display - followed by one line of ' !' and the next as '"#' which would draw your graphics pretty quickly. You'd have to re-convert the graphics back to Cybernoid format when you save for modding a Cybernoid snap with, though.
moving the highlight around would be easy - just invert the attrs of the four characters under your cursor, and again when you move away from that space to un-highlight it.
D.
Sorry, just got carried away. The time it took me to do 4 and a half screens was considerable. I was just working out a demo to spot anything else that may need editing for playability value, like the amount of cargo thats needed is too much for a small level. Also, it doesn`t matter where you place the aliens that enter from the edge of screen, you can put the code anywhere in a space on the screen as it doesn`t effect the position of the aliens. Anyway, I`d never have the time or patience to do a complete game.
One of the feelings I had whilst making the demo was that I`d like different graphics. There are more than enough tiles to edit for the walls, was thinking of a different look for each level or area, like rocks/volcanos, stone/pipes, metal/scaffold etc. The only problem I have is not sure how to change the colours/attributes assigned to each tile. I tried some Cybernoid 2 graphics but they were the Cybernoid 1 colours.
I didn`t want to usurp, just help. But i did enjoy myself too, something i would have loved to do when i first played this to death on my speccy as a kid.
My ZX Art Music Page
Carlos Michelis Theme
#768D LD DE, Jewel_Amount_Required
Of course you'd need to update that in the text as well at around #7740
"Failed to retrieve cargo of xxxx"
The colour table is at #E9B9 for graphic code 0. If you place a bp at #727C and follow the call to #A57F through it will show you how it does it. Then it's just a case of adding 4 for each successive graphic.
Graphic 1 attributes are therefore at #E9BD, #E9BE, #E9BF and #E9C0.
(change the above locations to say #44,#45,#46 and #47 before a game starts will show (yukkily) how it's done)
Graphic 2 attributes start at #E9C1 and so on.
How about this one.
I changed the jewel amount to 500, on successful collection of 550 I get 5500 bonus points and an extra life. However after this, the last character of the running score gets corrupted, even in the high score table. If i don`t get over 500 jewels the score doesn`t corrupt. It does it on succesful jewel collection of any amount.
I`ll make some new graphics tonight.
My ZX Art Music Page
Carlos Michelis Theme
Regarding the graphics and attributes: I think Mr.A has explained it above, but you'll find 170x16bytes for the graphics tiles at $D479. Format is L>R then Top>Bottom for each tile. The attribute data is directly after this, starting at $E9B9, and is 170x4 bytes long. Format is also L>R then Top>Bottom.
It should be easy to use a graphics editor similar to SevenUp to import, modify, and export the graphics into the correct format for patching.
I'm already doing that. I was very pleased when I got it to work. I'm using PEEK and POKE. I PEEK the attribute, subtract it from 127, and POKE it back.
Dunny, how many UDGs are available? I am doing a combination of what you suggest, I think.
The current graphics blocks at the bottom of the screen are POKED there directly from the memory location (PEEK and POKE again). This is what is V E R Y S L O W since each tile requires 32 PEEKs and 32 POKEs, and there are 16 of them. I thought I had to use POKE in order to get things displayed in row 22 and 23 of the display.
Entering tiles into the screen are a hybrid since working out screen coordnates as direct POKEs is somewhat painful. Instead, I POKE the relevant tile data into 4 UDGs (A,B,C,D), Then PRINT them in the correct location.
I display the attributes by direct POKE, becuase attribute coordinates can be easily calculated directly x,y cursor coordinates by adding them by:
POKE (22528+x)+(y*32), newattr1. etc.
Can you explain more the idea of pointing CHARS? I don't quite follow. Can I point it to the memory area containing the graphics? What does ! and # do? Cheers.
So, I guess that means I'm arrogant, naive, and plain stupid :D ;)
This happens on the unmodified Cybernoid game too.
In case you are interested, the bytes for the alphabet/numbers etc are held directly after the screen data ($A5AA to $C3F0). It starts at $C3F1, and continues right through to $C6F8, I think.
But it seems that this is not the area being corrupted. It must instead be the last byte of the string that holds the score.
Ok - if you think about it, the Speccy has to get its character set (the alphabet and symbols) from somewhere when you PRINT text to the screen. It does this by assuming that the Space character is 0, the ! is 1, the " is 2, the # is 3 etc... following the character set detailed in the manual.
This number is multiplied by 8, and added to the number held in the CHARS system variable. Then 8 bytes are read out and poked to the screen memory by the PRINT routine. Just like a UDG!
So by pointing CHARS to some other area of memory (your choice where) you can have up to 96 defineable characters as well as your 21 UDGs. When the PRINT routine outputs text it grabs them from your graphics.
Unfortunately, the Cybernoid graphics are in 2x16 format, so you'll have to convert them to character (UDG, or 1x8) format for this to work.
Nah, I'm interested in a BASIC solution. Any old idiot can use a powerful modern PC to write an editor, but it will take some real magic to get one out of Sinclair BASIC. Get to it, man!
D.
But now I am stuck because previously I was POKING the graphics into the bottom two rows of the screen. Is there a way to PRINT there? If not, this has been a bit of a wasted effort :-(
I tried playing with the DF SZ variable, but that doesn't seem to be what I thought it was from the description in the Sinclair manual.
Edit: Used the PRINT # solution here
Edit 2: Ha Ha! In comparison to ver0.4, this new version flies! Cheer's Dunny.
Aye, I just watched Dunny's RZX and it happens on the original as well. You can try this fix >
#76AA LD DE,#771F
(Poke 30379,31: Poke 30380,119)
Of course that means Dunny will have to re-record the rzx for score verification purposes :)
Demo Map V2
Cybernoid Demo V2 Snapshot.
I`ve been busy getting the graphics and attributes all labelled in my source code. So I can chop and change things easier. Also wiped the default map and tables area in my snaphot.
My ZX Art Music Page
Carlos Michelis Theme
Graphics
Start 52683
Length 7232 bytes
Divided by 32 for each tile = 226 tiles
Attributes
Start 59915
Length 904 bytes
Divided by 4 for each tile = 226 tiles
Some more hacking and setting a bp at $6FB2, check HL for map data address on each screen. Using a map of level 1, I worked out that the 5th screen as played(04 below), is the top left screen and therefore the start of the map data.
Room map address
00 A732
01 A970
02 A8FB
03 A6D0
04 A4D9 ; top left
05 A541
Map Data
Start $A4D9
Length 5946 bytes ($173A)
Possibly 256 more bytes available for map data as the area is filled with 00 at end of map.
Even more hacking and found the map table. 58 screens.
Map Table
Start $6E77
Length 116 bytes ($74)
Lots more to do yet.
EDIT:
Map data is slightly different than cybernoid 1 in that it has an extra compression type. e.g.
E3, 05, 12, 13, 14, 12
This is an entire horizontal line of 16 tiles. E3 05 repeats the next 3 tiles(12,13,14) 05 times.
So we have E3 and FF to use for space saving. E2 does something as well.! E2 05 will repeat the next 2 tiles 5 times.
Found the Levels Tables at $7219, 8 bytes per level, same format as Cybernoid 1, except 4 levels. 1st 2 bytes are start position, 3rd byte is width of map in screens, 4th byte is starting screen, 5th and 6th are timer, 7th is ship orientation as before.
Level table address set
ORG $71BB
LD BC, $7219
ORG $7219
Level 1; 5x3
$1A, $70, $05, $06, $F4, $01, $01, $00
Level 2; 4x3
$22, $60, $04, $0F, $F4, $01, $01, $00
Level 3; 5x3
$38, $90, $05, $1B, $84, $03, $FF, $00
Level 4; 4x4
$42, $80, $04, $31, $84, $03, $01, $00
Thats me done for moment.
How do I go about finding the music and sound fx routines/data for Cybernoid 1 or 2?
The only thing I can`t find is where Cybernoid 2 checks for the amount of levels?
My ZX Art Music Page
Carlos Michelis Theme
Not sure how to write a program to compress the data in Cybernoid 1 format, which if it finds 4 or more of the same bytes to write FF 04 ??.
My ZX Art Music Page
Carlos Michelis Theme
Wow! That is a lot of decoding, Frank! I've been off the forums for a day or two after the wireless network I hijack disappeared. They must have just upgraded the router or something because connection speed is now superb! :D
Part of my cybernoid editor compresses uncompressed bytes into the compressed format, but only in a screen by screen basis for now. I'm hoping to upgrade it soon.
It is a simple case of looking ahead and comparing the bytes, and incrementing a subcount for as many times as they are the same.
Here is the BASIC - it's probably pretty crumby compared to what the pros can offer :-): scr is the area where cybernoid gets its screens from (A5AA).
scrdata is the area where the uncompressed cybernoid screen data is stored - just a linear sequence of 160 bytes for each screen. I have them stored temporarily at 50944 ($C700)
dpos is just a byte counter through the uncompressed screen bytes.
ct is the compressed byte total.
sbct is the temporary count for compressed (FF)bytes.
The PRINTs are there just to monitor it.
Enjoy! I'm getting closer and closer to a useable editor :-)
Edit: Frank, I notice that Cybernoid2 uses 24x16 for some tiles (the ones with the lifts). How did you get around this problem when you uncompressed the data? Or are these in fact 16x16 in two columns, with part that you can fly through? I'm suddenly realising that it must be the latter - so probs ignore this edit :-) d'oh!
Edit 2: Well the compressor just failed to STOP. So it needs work. It must be due to incrementing dpos +3 close to the end of the screen, causing it to skip 159/160. I'll get on it.
The main problem with converting the cybernoid 2 map is the enemies, I have to work out all the enemy codes, then I can just poke 00 for the horizontal moving enemies. Maybe write a program to convert most other enemies to Cybernoid 1 format. e.g. peek and poke.
Edit:
I`ve edited the program above with; This is because it was writing FF 03 00, its best to have just 00 00 00.
I`m having a hard time converting the maps, I`m having to peek and poke all the animated tiles and enemy tiles below E9, guns etc. But I`m going to have to move the graphics locations around for it to look right with the Cybernoid 2 graphics, because the scenery is shooting at me! And too many guns on the screen make it crash.
My ZX Art Music Page
Carlos Michelis Theme
When it STOPs, the correct value of ct (compressed byte length of screen) will now be displayed.
Hopefully, I'm only a few days away from a "finished" version of the editor.
Here is a screenshot of the latest version, complete with ripped Cybernoid font :).
Version 0.5.4
Rendering is dramatically speeded up by shifting the CHARS variable about, although it still runs best at 500%.
Cybernoid 1 and 2 enemy codes (EC-FE) are the same except for these extras in Cybernoid 2.
; E4 = RIGHT DUO ENEMY 6.00 GAP
; E5 = RIGHT DUO ENEMY 5.66 GAP
; E6 = RIGHT DUO ENEMY 5.33 GAP
; E7 = RIGHT DUO ENEMY 5.00 GAP
; E8 = LEFT DUO ENEMY 6.00 GAP
; E9 = LEFT DUO ENEMY 5.66 GAP
; EA = LEFT DUO ENEMY 5.33 GAP
; EB = LEFT DUO ENEMY 5.00 GAP
My ZX Art Music Page
Carlos Michelis Theme
Actually this idea has piqued my interest. I could rearrange some of the graphics so that similar ones are closer to one another (e.g. all the tentacles, corners, pillars, etc). I need to create appropriate graphics to represent the special codes E9 to FE anyway.
Only problem I foresee is that it would not be easy to import modified graphics into the editor without a very complicated routine.
Cybernoid 1
=========
48K mode
========
you can set a bp at #85E2. HL now points to your sound ditty. Trace it through to see what it's doing. If you just want to alter the sounds then you can play with the values. Two instructions up from #85E2 you will see the table start at #8710. As far as I can tell the routines are :-
#8710 ?
#8718 fire bomb
#8720 ? (can you fill these in, I'm not a big fan of Cybernoid)
#8728 ship hit,enemy hit
#8730 fire bullet
To trace the tune set bp's at #654E, #81BE and #FBD6 *then* load the game and again trace through. At #81BF you will see HL loaded with the table base for the first run namely #FC4E.
#FB86 LD HL, #FC4E ; Tune starts here
(Break on #81BF and change to LD HL,#2000 at #FB86 ouch! - it will revert correctly after a minute or so due to below)
At #FBDC is the initialization of the second and subsequent plays.
128k mode
=========
Set a bp at #EFD1 to catch the tune and effects.
#EFCD LD HL, #F28E_table_start
Tune will be shown as it plays. It will keep breaking after so many notes are played.
A quick play reveals
#FA32 bomb (you need a bp at #7C97 to trap this one and trace thro')
#FA3C pick up bonus
#FA46 shot
#FA56 crash
#FA96 first hit off enemy
#FAA6 treasure
but I can only get to about screen 3 before I snuff it so again, fill the gaps. Be sure to wear stereo headphones when playing with the values then report back with a list of all the quavers, crotchets and semibreves :)
The routines I suspect will be similar in Cyber2 so just search for the same bytes around where you're breaking above.
Have you done this now? Can't fathom what you mean.