Skyhigh 07 ch12 Mixed
From C64 Diskmag Wiki
mixed about the making of skyhigh #6. howdy hackers, this is RAZ/CAMELOT with some coder-info about the new oufit of skyhigh. at the time i was asked to do the new outfit, i'd just finished coding the camelot mag 'REVEALED' and i was sick and tried of disc-mags. however, i deci- ded to do it anyway. some days later i recived a disc from biz kid containing all the things i needed to make the mag. at the time i'd allready decided to make a desktop menu, and the disc contained the graphics, music and 4 test chapters. i started to code the mag on a quite lazy wednesday and this is how i did it: DAY 1. biz kid had drawn some icons for the menu, but they was in a 'wrong' format and i therefore had to manipulate them a bit. they was drawn in the way: +$00,+$40,+$80,+$c0 meaning icon 1 was build of $01,$41,$81,$c1. but i needed to put some letters in the charset as well. i made a small program (in basic) that re-arranged the icons into another format (+$00,+$01,+$02,+$03. icon 1 = $04,$05,$06,$07). finally i copied the icons into char.pos $80-$ff. i'd now made the lower half of the charset free for some letters. biz kid had sent me the letter-charset (this one) and i now merged them into the lower half of my menu-charset. the next thing i did was drawing the frames for the windows. (yes they are made by me !!! hurray, hurray i bet i'll now enter the graphics charts!!). final- ly i inverted the letters and copied them into char.pos $40-$7f. i'd now got 2 set of letters: one normal and one in revers. the next thing i did was to de- sign the main-menu screen. the routines for moving the arrow and selecting the icons was very easily done because the main technique is simple: first of all you transform the sprite- coordinates into screen (x,y) coors. the first y-spr coor visible on the screen (below the top border) is #50 (#$32). therefore you subtract #$32 and then all you have to do is dividing with 8. (the screen lines are 8x8 pixels wide , and you want to determine at which scr-pos the sprite is): lda ypos sec sbc #$32 lsr a lsr a lsr a the first x-spr coor visible is #24 (#$18), and that means that it's pos- sible to subtract #$03 (3*8 =24 =#$18) in the end. the main problem is the 9th bit ($d010). this can be solved by using some bit-manipulating: lda $d010 and #%00000001 ;sprite 0 ;in this ;example. lsr a ;9th bit is rota- ;ted into carry. lda xpos ror a ;carry is rotated ;into 8th bit. lsr a lsr a sec sbc #$03 and now you've got the spr-coors in scr- coors. easy. the next thing i did was to make some tables with the x,y coordinates of the icons (and of the value to be returned if the icon is activated). i made most of the menu fade up effects this day and actually, this was what took must time to do. by the way: in this mag i DO NOT USE ANY INTERUPTS AT ALL. heck knows why, i just felt in the mood. (ok: it was the easies way of doing it). 2.SAY: i spent most of the time coding the fade up effects of the upscroller. the main techniques used are: LOGO FADE UP: the lo-res logo is covered with 14 x- expaned black sprites. the sprites is animated in a sequence which they disa- pear revealing the logo. quite easy code but it took me a while making everything run 100% smooth (timing!!). UPSROLLER: in order to make everything look/feel smooth i placed 7 black sprites (8 pix- els high) just below the headline. the text then scrolls into coverage of the sprites and disapears perfectly smooth. i did it this way because i'm a lazy person who prefer most thing the easies way. when the text is faded in, all i do is moving the black sprites from the bottem and up lighting the textline under the sprites. the final thing i did this day was to code the upscroller routine itself. i haven't got much to say about the upscroller it self but this: REMEMBER to set $01 to the right value if some of the text is placed 'underneath' the rom ($a000-$bfff, $e000-$ffff) or the i/o area ($d000-$dfff). 3.DAY: well not much to say: this day i debug- ged the whole thing (making all the up/ down fade routines work smoothly toget- her was the hardest thing), installed the loader/decrunch routine and finally installed the musics. debugging is a boring event. very boring. i just get so damn angry at my own routines when they don't work the way i want them to. arrrrrrgh. by the way: i'd forgotten to set $01 to #$36 and therefore the text in the area $a000-$bfff fucked up. bummer!. making the music run 100% smooth was a bit hard (i don't use any interupts in this mag, remember?), but as you see (hear) i made it. finally i mailed it to biz kid. LAST DAY: a few days (and some phonecalls) later a recived a disc from the ever smiling biz kid with some graphics that had to be changed. only one hard thing among this: the 8-colour fli sprite: FLI SPRITE: i had to open the top/bottom border in order to use this, and i had to make some changes in my code. first of all: now the border has gone missing i had to place a row of 7 black sprites at the last line of the screen. or else the text couldn't disapear properly at the bottom. however, the fli sprite was to be placed a few pixels below this row, and i therefore placed the black pixels in the lowest part of the sprite. ofcause this isn't hard in theory, but it takes quite a few tries to make look good and to debug. by the way: i also changed the colours of the main menu this day. (the old ones was red/yellow. looking good, but hard to see). the version finished this day is the one used in skyhigh #6. MADE IN 4 DAYS. it was quite fun to make and you hope you'll enjoy it as much as i do. 26/9 1993. -RAZ. -- -- -- -- -- -- -- -- -- -- -- -- -- ps. i'll continue this chapter in the next issue, with some words about the updated code in issue 7. furthermore, i'll start up my chapter about assembler programming in the next issue also. prepare yourself... .. .