Tuesday, 23 April 2019

ChillED Copy & Paste

While still toying with level backgrounds for "Chiller 2", I've come to the realisation that I will need a select/copy/paste function in "ChillED", my screen editor.  I was hoping to get away without having this feature since I'm spending more time on the editor than the game at the moment!

Having said that, if a copy/paste function makes life easier, then the editor shall have it!  So guess what I've been doing for the last few days while on a break away?

That's correct!  Select, copy and paste is now in!  Still a few small bugs that need ironing out, but here it is in action while I was pixelling a quick version of Yoda!


Next diary entry...

Friday, 19 April 2019

Joystick Detection

I fancy a mini-break from ChillED; it's occupying too much of my head-space at the moment and I need to do something different!

Thus, I've decided to write and slot into place the joystick detection code.  At the moment, the code is very general since it's not being called by any other routine or not actually doing anything itself other than detecting the joystick move.

To be honest, I've meddled with joystick code before in a previous project (Super Galax-I-Birds), so this new code is a modification of that projects code for Chiller 2 and it all starts with memory location $dc00.


; check joystick left, right and button press 

joy_check
   
           lda $dc00  
           sta joystick  
             
 joy_left  
           lda joystick  
           and #$04  
           bne joy_right  
             
           jmp joy_end     ; jsr to another routine in future!
             
 joy_right  
           lda joystick  
           and #$08  
           bne joy_fire  
             
           jmp joy_end     ; jsr to another routine in future!
        
 joy_fire       
           lda joystick  
           and #$10  
           bne joy_end
                           ; jst to another routine in future!
joy_end
           jmp joy_check


Memory location $dc00 can detect various joystick inputs by 'and'ing in various values as above.  In the code, if an input isn't detected, it skips and checks the next input, but if an input is detected some other code can be run, but here it just jumps down to the end at the moment.

Note, there is no detection for up or down because Chiller 2 won't be using those movements, otherwise it would be simple to add more code to the above for those movements also.

And it's that simple in assembly language to detect joysticks!

Next diary entry...

Friday, 12 April 2019

ChillED Data Export

Been building to this, a feature for "ChillED", my screen editor, that will enable me to put screens/levels straight into the game with ease: screen and colour RAM data export!

The data format is simple text, but it includes a "byte!" label at the start of each line to copy and paste straight into my ACME formatted source.

Here is the feature in action:


To be honest, the export has been working for the last few days and I've been using the editor to pixel some PETSCII screens and have been exporting them to some hastily written display code which has then been tested on my C64mini.  Here is a very quick version of R2D2 pixelled in ChillED, data exported to my rough code and being display on my spare TV using the 64mini...


All appears to be working nicely!

Next diary entry...