I did this in the end. I rewrote the Neo Thunder Player-Bullets Vs Enemies collision check routine in 68000 code within GCC 2.95.2. But it was a pain! It would only let me pass 5 variables to the inline 68000 routine so I had to copy the other 5 variables into a "C Struct" before the 68000 routine and then copy them back afterwards. Plus when I saved the CPU registers to the stack, GCC would compile the memory locations for all the variables wrong. So it was crazy for me (a 68000 beginner!) to fix all this. In fact I didn't even know what was going wrong for a long time. Fortunately I did eventually manage to get it all working, although there was a lot of frustration on the way.
The pics below show the busiest part of the game (over 50 enemies onscreen) and how long in display lines the Player-Bullets Vs Enemies collision check routine takes (the blue bar). The "Max" figure is the one to look at. This shows the maximum number of display lines taken by the collision routine in this part of the game
Original game. Collision routine takes a maximum of
137 display lines
My optimized C code. Collision routine takes a maximum of
56 display lines
New inline 68000 code. Collision routine takes a maximum of
35 display lines
The new 68000 collision routine is 400% faster than the original and 62% faster than my optimized C code. I'm sure my 68000 routine is not the fastest possible but because I coded it in a very simple way, I think it must be very efficient.
I still have some more time to go before I completely finish but I will share the new Neo Thunder code at the end with the community. It will never be a great game BUT it is at least BETTER without the slowdown.