Captain Cozmos Posted May 19, 2022 Share Posted May 19, 2022 (edited) In my observations using the Super Action Controller Spinners is not much different than using the Driving Controller or the Roller Controller. One SAC is up and down where the other is left and right. The Steering Wheel is of course left and right for one of the players while the Roller Controller incorporates both SAC Spinners into U/D/L and R In theory you could connect two Driving Modules with the right programing. I would like to know, because of a bit of research, does anyone have existing Z80 routine that uses a the Roller Controller or Driving. Just a bit to get started that has already been tested or at the very least some really good direction. I think I read somewhere that the early Colecovision games did not have bios code for SAC or roller controllers but I could be wrong on that so I may also have to come up with my own routines. I am still working on HH but like all bummers real life interferes. 99% of the logic is in place I am now working on even more scroll code because the playfield is 64 rows compared to the 24 coleco screen. So a bit of math for all the pieces that I have not had the time to work on. Edited May 19, 2022 by Captain Cozmos Quote Link to comment Share on other sites More sharing options...
PkK Posted May 19, 2022 Share Posted May 19, 2022 My library comes with a demo "cursersmooth", that shows a cursor on-screen that can be moved both by the joystick and by using the roller controller as a trackball. I only tested it with the roller controller and super action controllers though, not the driving wheel. Quote Link to comment Share on other sites More sharing options...
Captain Cozmos Posted May 19, 2022 Author Share Posted May 19, 2022 1 hour ago, PkK said: My library comes with a demo "cursersmooth", that shows a cursor on-screen that can be moved both by the joystick and by using the roller controller as a trackball. I only tested it with the roller controller and super action controllers though, not the driving wheel. Thank you for the reply. Is it in Z80 or C? I am trying to do everything in 100% Z80 assembly language. This is research for something I would like to do in the future that uses the trackball but I would really need every byte and speed only assembly could provide. Quote Link to comment Share on other sites More sharing options...
PkK Posted May 19, 2022 Share Posted May 19, 2022 The library is written partly in asm (for low-level stuff and some of the speed-critical parts), partly in C. The demo is then written in C. There used to be more asm in the library, but the compiler has gotten much better over time. So recently, some of the hand-written asm from years ago got replaced by C code, since the compiler now generates code that is at least nearly as good, and often better than the old hand-written asm. Even today, it can make sense to have a look at the asm the compiler generates for speed-critical parts to check if hand-written asm could be faster. But often, the compiler, when using the right optimization options will generate good-enough code. IMO programmer time is most efficiently spent looking closer and longer at the parts that are really speed-critical and leaving the rest to the compiler, instead of writing everything in asm. Quote Link to comment Share on other sites More sharing options...
AnalogKid Posted May 24, 2022 Share Posted May 24, 2022 On 5/19/2022 at 4:21 PM, PkK said: The library is written partly in asm (for low-level stuff and some of the speed-critical parts), partly in C. The demo is then written in C. There used to be more asm in the library, but the compiler has gotten much better over time. So recently, some of the hand-written asm from years ago got replaced by C code, since the compiler now generates code that is at least nearly as good, and often better than the old hand-written asm. Even today, it can make sense to have a look at the asm the compiler generates for speed-critical parts to check if hand-written asm could be faster. But often, the compiler, when using the right optimization options will generate good-enough code. IMO programmer time is most efficiently spent looking closer and longer at the parts that are really speed-critical and leaving the rest to the compiler, instead of writing everything in asm. I would agree with you. The latest version of SDCC is surprisingly efficient for the if/then/else logic, case statements, and basic math. Where it falls down is that it's a general purpose compiler and doesn't have game-oriented heuristics that efficiently deal with C structures which is of course what you'd typically use for game characters, but I certainly can't fault them for that. That's where you'll want to take its ASM output and replace C code with inline assembly that walks the structure members efficiently. This is also why the ordering of structure members is actually one of the most important optimizations you can make for both size and speed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.