Search found 2058 matches
- Sat May 21, 2022 1:34 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
It's all useful. Although the more layers there are to it, the harder it gets to explain how to exploit it as a library function! Having said that, I think perhaps my stack manipulation is a step too far as it means dictating that the interrupts have to be disabled. I'll have a go at the interleaved...
- Fri May 20, 2022 6:25 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
Again, it's optimising a game engine with a specific purpose in mind. I'm simply trying to get some speed for flat-out rendering to transform a character map into a screen display.
- Fri May 20, 2022 5:36 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
OK, this is my fastest to render all 28x20 UDGs with no skips, but leaving the 2-character border. You can see from the border switch how many scan lines are left at the bottom of the second frame. The main row loop is fractured so that the last UDG on the row is done separately by a duplicate of th...
- Fri May 20, 2022 3:27 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
My routine will "blit" the full CharMap (less the borders) to the screen in just under 2 frames, if I simply remove the checks for zeros. That sounds like it's faster than using the stack, @Joefish Mine does the same. If you set the border colour there's just a few lines at the bottom of ...
- Fri May 20, 2022 12:41 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
OK, I've fixed it so that for Attribute-only cells, the first byte in the UDG lookup table is actually the attribute, so it can be fetched and copied as quickly as it could from an interleaved store. There's an improvement in speed, but it's still around 1.4 frames to render the new case with 50% UD...
- Fri May 20, 2022 11:53 am
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
OK, I've got that running on mine and it's basically still around 1/150th of a second with 5 sprites on the screen But that's not drawing anything but the sprites each time, is it? And just skipping over everything else? How long does it take if it's actually rendering all the characters I've defin...
- Fri May 20, 2022 11:41 am
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
I've not done a .TAP as it's fiddly to upload files at times, whereas cutting and pasting source is easy enough. I assemble with PASMO and the --tapbas extension, which generates a .TAP file with a BASIC loader attached. You can launch the file straight away in ZXSpin from the command line. I have a...
- Thu May 19, 2022 9:45 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
OK, I've upped the test screen to what I think (if I've counted correctly) will draw 50% of the UDGs in the 28x20 rendering window; the remaining 50% are attribute-only (codes 0 or 1). This code does 256 passes and seems to do it in 8 seconds, though maybe FUSE can capture the exact number of frames...
- Thu May 19, 2022 12:20 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
I don't have any loop counters - I optimised them away! I just increase the screen address LSB and loop if it doesn't overflow. When it overflows, I add 8 to MSB of screen ADDR and test for it being >80 - as that bit of code only runs 3 times it doesn't have to be tight. I can see you're relying on...
- Thu May 19, 2022 11:09 am
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
Not a huge margin, and as you say, juggling the registers to make it work could be costly. I'm trying to work out how to do all the loops and counting in registers working back from that core routine. I still need to be able to use an LDI to do the attribute. After I do that and LD SP,HL (6t) I can ...
- Wed May 18, 2022 5:45 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
I wouldn't form an opinion on that based on the efficiency of my code, TBH. Also, most of the time it's not actually drawing any of the UDGs, due to it skipping unchanged tiles. I was thinking the optimisations are a trade-off between getting to the UDG as fast as possible versus drawing it as fast...
- Wed May 18, 2022 12:57 pm
- Forum: Sinclair Miscellaneous
- Topic: Chuckie Egg Kempston Support, strange behaviour in Emulators
- Replies: 13
- Views: 805
Re: Chuckie Egg Kempston Support, strange behaviour in Emulators
are you sure it's the real hardware and not just a convention? Yes, I'm sure. I've dismantled and re-wired these interfaces. If they only monitored one address line then when you moved it from A5 to A3 to make a K-55 interface (IN 0x37) it would clash with other hardware. It's only good for K-55 if...
- Tue May 17, 2022 7:06 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
I'm now less convinced that interleaved UDG data is the fastest way of doing this...
- Tue May 17, 2022 2:39 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
A tiled engine could do platforms or mazes. And if you can have some way of prioritising tiles over sprites you can even do those pseudo-overhead RPG type views, where your sprite can go behind the tips of building roofs or tops of trees. That's fairly easily done on a character-based engine by simp...
- Tue May 17, 2022 12:04 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
the worst thing with the original task is 8x8 tiles. if only they could be 16x16… then the whole bag of stack tricks could be used (like i did with attribute copying in one of my solutions). p.s.: and strict restrictions on additional memory… no JIT compiling, no tilemap massaging… sigh By all mean...
- Mon May 16, 2022 5:36 pm
- Forum: Announcements
- Topic: Spectrum40 / 40 Years ZX Spectrum 2022 Meeting
- Replies: 32
- Views: 2302
Re: Spectrum40 / 40 Years ZX Spectrum 2022 Meeting
When my nephew used his playstation with Crash Team Racing (such an excellent game I will say) he would press the button along with tilting the controller and extending his arms to the direction he wanted to turn. He thought it made the kart turn and move faster. Great fun to watch. He still does i...
- Mon May 16, 2022 12:28 pm
- Forum: ZXDB Discussion
- Topic: Dizzy , 3 weeks in paradise type of games
- Replies: 22
- Views: 865
Re: Dizzy , 3 weeks in paradise type of games
The Egghead series of games are worth a look. These lean more towards platforming over purely getting the right object to the right place, but then that's the whole issue again of how far the definition is stretched. Not that that helps you with your search parameters...
- Mon May 16, 2022 12:09 pm
- Forum: Announcements
- Topic: Spectrum40 / 40 Years ZX Spectrum 2022 Meeting
- Replies: 32
- Views: 2302
Re: Spectrum40 / 40 Years ZX Spectrum 2022 Meeting
Did Joefish give that lad a dead arm when the video stopped? Might have stopped him trying to break my joysticks all day! Look at the strain in his shoulders - all that effort going into wrestling one ArcadeR! I programmed it - you don't move any faster if you push the stick harder... (And he's bla...
- Mon May 16, 2022 12:03 pm
- Forum: Programming
- Topic: Experiments with the Spectrum ROM Font
- Replies: 27
- Views: 1317
Re: Experiments with the Spectrum ROM Font
I like the look. Can you explain the algorithm? Is there some sort of clever adaptive function going on, rather than simply expanding a specific list of rows within each character?
- Fri May 13, 2022 3:20 pm
- Forum: Games/Software
- Topic: Speccy graphics with interesting source reference/inspiration?
- Replies: 4
- Views: 364
Re: Speccy graphics with interesting source reference/inspiration?
The grid girl from SEGA's Super Monaco GP https://www.mobygames.com/images/shots/l/114439-super-monaco-gp-zx-spectrum-screenshot-you-can-t-really-make.png was originally Mercy Rooney from Playboy's Dec '72 issue, leaning against a rock wearing a bit less! Getting disqualified (at least, on the arcad...
- Thu May 12, 2022 4:20 pm
- Forum: Emulators
- Topic: Searching for Win 32-Bit Screen-Viewer or commandline converter Z80TOSCR
- Replies: 7
- Views: 219
Re: Searching for Win 32-Bit Screen-Viewer or commandline converter Z80TOSCR
Someone was just showing me a plug-in for Microsoft's freebie generic code editor suite 'Visual Studio Code' that has a Speccy snapshot viewer.
It also has a PASMO Z80 syntax highlighting plug-in; I might try using it for development since Crimson Editor doesn't seem to be supported any more.
It also has a PASMO Z80 syntax highlighting plug-in; I might try using it for development since Crimson Editor doesn't seem to be supported any more.
- Thu May 12, 2022 11:19 am
- Forum: Sinclair Miscellaneous
- Topic: Chuckie Egg Kempston Support, strange behaviour in Emulators
- Replies: 13
- Views: 805
Re: Chuckie Egg Kempston Support, strange behaviour in Emulators
Always bugged me, that. There's absolutely no reason why it should exclude keys used in one keyset from another - especially from a keyset you can't edit ! I wonder if it was ever the intention to give the 1-4 players their own controls, but that'd be stupid in itself as you only play one at a time....
- Fri May 06, 2022 8:08 pm
- Forum: Games/Software
- Topic: Guess the screen$
- Replies: 7861
- Views: 237491
- Fri May 06, 2022 4:28 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
It's just meant to be a tool. A one-level up assembly-friendly version of CharAde . You don't necessarily need to understand all the code in a library function in order to use it. The point here is to get some expert optimisation of a routine for rendering to the screen from a character map. The lev...
- Fri May 06, 2022 3:16 pm
- Forum: Programming
- Topic: Optimisation Challenge, for the benefit of new programmers
- Replies: 94
- Views: 3436
Re: Optimisation Challenge, for the benefit of new programmers
Anyway, my idea for a scrolling game using this system is to split the UDGs roughly in half, the first 128 for scenery and the rest for sprites and animations. The first half are then split again; 64 for foreground stuff and the other 64 split, yet again, four ways for the parallax. That leaves 16 U...