Bruce Tomlin, on Mon Jun 4, 2007 3:51 PM, said:
Gorf, on Thu May 31, 2007 1:51 PM, said:
asembler to local ram like Atari did. Some of us out here actually know how
to run code reliably out of main RAM from the GPU and we also know how to
reliably jump around in main and back and forth to and from local and main.
Let me know if you need any help.
If the 68K memory map is accessible from the coprocessors, then you should be able to use labels from any address, as long as you keep in mind that the risc mode uses word addresses, and any labels defined in 68K mode have to be divided by two.
If all you are doing is risc code without 68K code, there should be no reason why you can't ORG or RORG to any old address you want.
Bruce, we need a new GCC cross compiler for the Jag that encompasses the new programming techniques/bug fixes. (see below)
We also need a new MADMAC to do the same for assembly development on the system (see below)
If you know where we can find information on HOW TO build a new GCC for the Jaguar that would be great.
If you know where we can be pointed to to fix our MADMAC problem(see below as well), that also would be great.
Bug fix details follow:
Steve Scavone, CEO of 3D Stooges elaborates on the GPU/Main Ram hardware bug he has most recently squashed in the Jaguar:
Quote
The pipeline is how the instructions flow into the GPU from memory. The RISC processors grab more than one instruction per fetch. In local RAM this is not a problem. However, for some reason the pipeline seems to ignore the jump and JR instructions in some cases when running from main RAM. The story goes that the GPU can not jump across a page boundary reliably. This is now proven to be false. I have 'fixed' the GPU problem with a little trial and error coding.
The truth is if you remove all other processors from the bus, the GPU will run in both local and main and also allow jumps to and from either. The only trouble with that is the rest of the system is rendered useless! The only video you could have is the GPU writing directly to the line buffers and that wont be all that impressive. All sound would have to be internal to the DSP and it could never talk to the bus when the GPU was. Not at all practical. Fear not as there is a TESTED solution now.
So far I have a 36k program of GPU code running from main jumping all over the place across pages and all. With the source code from Brainstorm and this newfound discovery of mine, I can re write MADMAC to adhere to these rules. This would not only allow more effcient use of larger GPU code not having to any longer spend 300,000 cycles a second per 4k module in the GPU just to run it faster but it will also allow for a sensible C compiler for the main code.
If Atari at the time had explored further, they would have found that the Jaguar is a lot more capable than even they realized. It took me less than 2 weeks a few hours a nite to figure this out. this really could have made all the diference in the world.
Example: If you were blitting in 4 4k modules into the gpu every frame, thats 1,200,000 cycles a second wasted waiting for the blitter to load code in the local RAM. Yes the GPU takes some cycle hits running in main but it pales in comparison to the deady hits of running code this way. Now all you need to do is load a compact renderer ONCE into local RAM and simply call it when needed. All the translation and all can be efficiently done in main.
The 68k is still needed however, to assist the GPU in jumping between main and local RAM. I hope to discover a fix for this as well. I think I may already have too. Even if not the 68k is asleep except for a few cycles to re-aim and re-start the GPU, then its right back to bed, like it should have been! Experiments to follow!
Sincerely,
Steve Scavone,
CEO
Edited by JagChris, Mon Jul 23, 2007 2:44 PM.













