| www.retrosoftware.co.uk http://www.retrosoftware.co.uk/forum/ |
|
| Clowning around http://www.retrosoftware.co.uk/forum/viewtopic.php?f=73&t=479 |
Page 2 of 2 |
| Author: | recycled [ Fri Jun 18, 2010 9:59 am ] |
| Post subject: | Re: Clowning around |
TomW wrote: Re EORed sprites - why EOR them? Just have a blank column or two of pixels round each balloon and just STA them onto the screen. Ouch MartinB wrote: I can't just visualise how that technique would be applied to allow the balloon to both move one-pixel and waggle it's tail? Yes, it's hard to wrap your brain about. I use another computer with a paint style app to plot one sprite EOR over the other (blast, brain freeze again in the last message, XOR - what did I mean by that!). Save the resultant mess as the new sprite. It's surprising what simple results are produced. Again, using the space invader reference, the classic jellyfish top row... and sorry for the binary tables in this font 000110000..........000101000................000110000 001111000..........001000100................001111000 011111100..........010000010................011111100 110110110..EOR...101101101..results in...110110110 111111110..........100000001................111111110 001001000..........000010010................010110100 010110100..........000110101................100000010 101001010..........100001000................010000100 and another plot of the EOR sprite with further pixel offset to the right restores the original shape, the tentacles wave merrily on the breeze. I would expect even with the waving tail on your colour balloons the results will be the same, but your sprite would be described with strange colour nybble combinations I suspect TomW is right, this idea is too much work when a simpler overplot will do, I regret suggesting it as the more I ponder it for your task I see it's going to gobble extra memory storing two extra sprites for left/right movement, whereas adding a 'black' column to your original sprite obviously only adds a single byte per row of sprite data. And it will do anybody's head in, working out the intermediate 'sprites'. |
|
| Author: | RichTW [ Fri Jun 18, 2010 10:52 am ] |
| Post subject: | Re: Clowning around |
Yeeks! That bug hurts my head just to contemplate it at the moment! Maybe I should've had an earlier night... MartinB wrote: Ok, I understand (finally!) about the vsync positioning and no, it's not a viable alternative. I did actually contemplate a timer-only route but I wondered whether there could be drift between vsync and the 6522 since I assume neither can be 100% accurate? Anyway, even if it did run accurately it would as you say be somewhat fiddly and I think I would feel nervous about it hanging together properly. I always had the same doubts, but in fact it turns out that the timing is rock solid and you can rely on it 100%.If you want to try and get it running on just one timer interrupt, here's how to do it. The trick is to set Timer 1 to free-run mode, set its reload latch to the screen refresh period minus 2, wait for vsync, and then set the timer to the interrupt at the desired point on the screen. When it reaches zero and interrupts, it will automatically be reloaded with the latch value, and will interrupt at exactly the same point on the screen next frame. Note you need to turn screen interlace off (*TV 0,1 or via CRTC register 8) because otherwise the timing is slightly different. Code: ; This is the number of timer ticks per frame (num PAL scanlines * 64us/line) Disclaimer: I haven't tested this, if it burns your toast and scares the cat, it's nothing to do with me.; This timing is only true of non-interlaced modes. ; We have to subtract 2 because the latch reload costs 2us. ; This is not documented anywhere! FramePeriod = 312*64-2 ; Calculate here the timer value to interrupt at the desired line TimerValue = whatever .Initialise50HzTimer ; Set T1 free-run mode LDA #64 STA &FE4B ; Write T1 low now (the timer will not be written until you write the high byte) LDA #LO(TimerValue) STA &FE44 ; Get high byte ready so we can write it as quickly as possible at the right moment LDX #HI(TimerValue) ; Wait for VSync without having to catch it from its IRQ SEI LDA #2 STA &FE4D ; clear VSync flag .waitVSync BIT &FE4D BEQ waitVSync ; poll VSync flag STX &FE45 ; start T1 counting STA &FE4D ; clear VSync flag CLI ; Set latch up to reload every frame LDA #LO(FramePeriod) STA &FE46 LDA #HI(FramePeriod) STA &FE47 ; now T1 will interrupt every frame at the same place Perhaps doing it like this will save your IRQ reentrancy woes! |
|
| Author: | MartinB [ Fri Jun 18, 2010 11:58 am ] |
| Post subject: | Re: Clowning around |
Cheers Rich, you've made that look very simple! I will indeed give it a whirl later and report back. Looking more closely at the hardware, I can now see that if there is any drift or jitter (there will be some, albeit small) both timing edge references will be identically affected in terms of magnitude and direction and so the effects would be completely transparent. Nice one I'm still determined to bottom the bug though because it's really making me cross now! If it's someone else's code then it seems ok to a reach a point where you just have to give up but when it's your own code... recycled wrote: I regret suggesting it... Hey, not at all. This is a programming discussion thread and reminding me and others of all the available techniques is never wasted information |
|
| Author: | MartinB [ Sat Jun 19, 2010 1:04 am ] |
| Post subject: | Re: Clowning around |
As ever, nice one Rich Slightly thrown together as I was running a bit late but apart from one little wrinkle it works a treat. In the first video you can see the minor problem in that following a fresh start or a <Ctrl><Break>, the sync point slowly rolls but after a second <Break> and re-run (or a <Shift><Break) everything is rock steady thereafter. I've not had time to investigate, presumably going to be some missing initialisation or suchlike, but doubtless it can be sorted. The two manifestations are shown sequentially in the first video where the sync timing visualisation is also present for clarity. LATER EDIT : Doh! Just realised that a *TV 0,1 doesn't take effect until after a <Break> so my putting it in the !BOOT file is a waste of space. Therefore Rich, ignore the 'little wrinkle' and you scored 100% first-time in your timing test! In the second video I've removed the visualisation and let things progress a while so that the nicely flicker-free balloons can be seen. As I said in an earlier post I can sort the clowns and base flicker with some intelligent scheduling. And.... regarding the dreadful bug, yes it's been 'fixed' but as an indirect consequence of being able to revert to a single timer. I'll explain that cryptic statement at a more reasonable hour Bottom line, great call Rich (Incidentally, if anyone thinks I've suddenly got a lot better at playing my game, I haven't. I was forced to write a computer player because I'm too crap to test things properly |
|
| Author: | SteveO [ Sat Jun 26, 2010 12:09 pm ] |
| Post subject: | Re: Clowning around |
Way hey, late to this but looking really good. Are you using Swift for this ? I've a Alpha debugger version knocking about if you'd like to try it. I've a video of it somewhere that I'll try and post today to see if it fits peoples needs. It's been available for a few months actually but RL has been distracting at the moment. |
|
| Author: | MartinB [ Tue Jun 29, 2010 12:30 am ] |
| Post subject: | Re: Clowning around |
Sorry for going abruptly quiet on this, I needed to return to my unfinished STH Bluetooth project and write some utilities which I'm still on with at the moment. Actually Steve no, I have to confess that I'm not writing it using Swift but I do intend to switch for my next project. I started this some time ago and since I'm not a true softy, I'm finding that a masochistic grass roots approach is forcing me to learn the fundamentals in fine detail which I think will stand me in good stead for future projects. Does that make sense? In that respect I suppose it's arguably a very 'authentic' game in that yes, I'm using a PC as a text editor and I'm using BeebEm (and B-em) for the development cycle but I'm using the (Beeb) Lancaster University 65C02 Assembler to assemble and build the code. After an edit I go to SSD/DSD vis DFS Explorer and thence to BeebEm for assembly via the Lancs 1.60 rom. I wind the speed of BeebEm up to 100x and the full game takes about 30 seconds to assemble and build the executable. (Flip, that means it would take nearly an hour to assemble on a real Beeb @ Rich : I didn't strictly fix that bug because when I looked back at earlier versions I saw that I had inhibited interrupts for the 'flip' process and made some cryptic notes about variable memory corruption. However, when I migrated to the dual interrupt version I shuffled things around somewhat and created a buggar's muddle such that whatever the original issue was, I had now lost the plot I will be back as soon as my other stuff is finished since I do have one or two other questions on gamey things that as yet I haven't fully sussed. |
|
| Author: | DaveJ [ Thu Jul 22, 2010 8:25 am ] |
| Post subject: | Re: Clowning around |
What a fantastic game - and given that it features couple of clowns working together to break things it's also very topical. Can't wait to see this finished off - I reckon this will be very popular with the punters at shows. |
|
| Author: | MartinB [ Thu Jul 22, 2010 1:33 pm ] |
| Post subject: | Re: Clowning around |
Thanks Dave, your approval is much appreciated Dave wrote: given that it features couple of clowns working together to break things it's also very topical. So, that would be me and...?I assure you it will get finished asap - I don't like leaving things undone but I tend to have a bit of a grasshopper mind when it comes to Beeb stuff, hence the diversion onto my Bluetooth activities. (Did you see the latest Headbutt'o'Vision video btw?) Of course, you do realise that the game getting finished might result in a request for a creative spurt from your good self |
|
| Author: | DaveJ [ Thu Jul 22, 2010 3:57 pm ] |
| Post subject: | Re: Clowning around |
MartinB wrote: Of course, you do realise that the game getting finished might result in a request for a creative spurt from your good self As long as you don't want me to write the novella that DaveM wants to include with every copy, I'll be happy to oblige. |
|
| Author: | Samwise [ Thu Aug 19, 2010 1:20 pm ] |
| Post subject: | Re: Clowning around |
Hey, did anyone else spot this game in Jason Kelk's Homebrew section on page 101 of the latest (#80) issue of Retro Gamer? It's described as "looking rather spiffy"! Well done, Martin. How does it feel to be a star? Sam. |
|
| Author: | Matt [ Thu Aug 19, 2010 1:27 pm ] |
| Post subject: | Re: Clowning around |
Samwise wrote: Hey, did anyone else spot this game in Jason Kelk's Homebrew section on page 101 of the latest (#80) issue of Retro Gamer? It's described as "looking rather spiffy"! Well done, Martin. How does it feel to be a star? Sam. I spotted it !! you beat me by about 1 hour, I didn't know about this game, looks really good look forward to playing it sometime, it reminds me a bit of Wizalon a game that was an Acorn User type-in years ago. Matthew |
|
| Author: | MartinB [ Thu Aug 19, 2010 7:36 pm ] |
| Post subject: | Re: Clowning around |
Flip! I'd better get back over here asap - shouldn't be too much longer on 'Project Bluetooth' ...and thank-you very much to you all for the encouragement, I aim not to disappoint |
|
| Author: | DaveJ [ Fri Aug 20, 2010 12:25 pm ] |
| Post subject: | Re: Clowning around |
MartinB wrote: Flip! I'd better get back over here asap - shouldn't be too much longer on 'Project Bluetooth' Yes, it's more civilised here - no ranting Sir Les Patterson like over at STH |
|
| Author: | MartinB [ Fri Aug 20, 2010 1:06 pm ] |
| Post subject: | Re: Clowning around |
|
|
| Author: | RichTW [ Thu Sep 29, 2011 2:59 pm ] |
| Post subject: | Re: Clowning around |
Did you ever get any further on this amongst your millions of Beeb projects, Martin? It looked good! |
|
| Author: | Samwise [ Thu Sep 29, 2011 3:04 pm ] |
| Post subject: | Re: Clowning around |
I can't believe it's over a year since we last touched on it. Where did that time go?! More importantly, when we can crack on and get a WIP page and forum up for it so ppl know about it?! Sam. |
|
| Author: | MartinB [ Thu Sep 29, 2011 9:33 pm ] |
| Post subject: | Re: Clowning around |
[ me holds head in shame It's a fair cop guys, my other stuff has distracted me for far longer than I expected but hey, how time flies when you're having fun Actually Rich, I am further ashamed to confess that whilst I have been avidly following Blurp's progress (awesome btw Anyway, no it's not forgotten and it will get done but this is the reason I didn't originally want to break cover at all, never mind have a wiki Sam! As I said a year ago, won't be long until I return and to be fair, I do always finish everything but it's just that I have the mind of a hyperactive grasshopper.... Thanks for asking though guys |
|
| Author: | Samwise [ Thu Sep 29, 2011 10:32 pm ] |
| Post subject: | Re: Clowning around |
No worries, Martin - unless you count my solitary level contribution to R:TLR, neither me or Rich have actually released anything for RS yet either. haha ... ... and the UPURS stuff is massively exciting. ... and I'd be the /last/ person to suggest anyone's getting behind. *the towering pile of TODO lists, sways and wobbles dangerously* Sam. |
|
| Page 2 of 2 | All times are UTC [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|