To NOP or not to NOP

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

furrykef
Interested
Posts: 30
Joined: Mon Jul 21, 2008 7:28 pm

Post by furrykef » Thu Jul 24, 2008 8:17 pm

TmEE co.(TM) wrote:For any more serious MD dev, you need a flashcart or something else to run your code on the real deal... there's a lot of stuff you can do in emulators and not on real HW. Try using BTST on VDP ;)
Well, sure, but I think the point still stands -- especially if the required delay might be slightly different with different MD versions or different controllers. It's silly to bother to check the compiler output when you can just write "NOP NOP" and be done with it. If we were in a tight loop, it might be worth it, but this is a once-per-frame deal.

But as for needing a real MD, perhaps sometime we should write a debug emulator that will warn you if you do anything like write to a forbidden address or access the joystick ports without waiting long enough or whatever.

- Kef

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Jul 24, 2008 8:27 pm

I myself like to cut corners too, and one thing for sure is that you can't cut corners in the controller reading routine... I had great deal of input issues (like auto fire effect) in my first (and so far last) MD game ( http://www.hot.ee/tmeeco/DWNLOADS/GBMD.RAR ) during the testing on real HW period. One NOP is good enough though...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply