Nice job catching that there calc84. Sometimes I forget possible optimizations when I don't have the full instruction set in front of me. btw on the instructions that you replaced, I wanted to know if you're aware of the hidden slow down when you try to access a register when the previous instruction loaded data from memory into it. The code is fine, but I was just wondering if it was by luck you had it formatted that way or if you knew the whole time because you seem to be very skilled with Super H asm.
Just to put my view in here. The internet is where I go to forget the prejudices of normal life. What is great about that is that you don't have to reveal your religion, gender, sexual preferences, wealth, social status, appearance, and/or political orientation. And even if you do reveal information about yourself, you shouldn't have to face any of the persecution of normal life as this is a place where we forget our own opinions and are respectful and tolerant to others. I try to keep my own information rather secretive because I don't want people to judge me because of my beliefs. I want to be known for only my programming ability and not my religious affiliation. IRL I'm a very strong opinioned person, but over here I forget all of that because this isn't the place to discuss such issues.
And just if you want to know here is a little bit of information about me. I don't really mind about the whole internet privacy thing. Some of things you wouldn't of guessed because I don't normally reveal this in my posts.
Spoiler For info:
My name is Jack Moore, but you can call me z80man. I'm male, but you probably knew that already. I live in Orange County, California and go to Santa Margarita Catholic High School. So yes going to a private school means I do come from a wealthy background but so what. You could also probably tell from my school name that I am a Christian and quite devout too. Politically I am a member of the Republican Party and I align myself as a conservative. Don't take me as a greedy person because of this. I don't agree with everything my party says and as a Christian I feel the need to help the poor. You could say I'm a grassroots which means I support community led charity projects as opposed to big-government welfare payments. I just find that through the government there is too much corruption with all the big salaries and pensions that congressmen take for themselves. I'd rather take an active role in the cause and see to it that all the money goes to the right place. I also have plans to join the Navy later on due to my patriotism and devotion to the USA. Back on the topic of religion I am very tolerant there which makes me different from most conservatives. For example I have no idea why Christians and Muslims have to fight so much. The Old Testament even prophesizes the founding of Islam when Abraham has his first son Ishmael. I find this reason to believe that Muslims are justified in there belief and that both religions should live in peace. And then with Atheists, I do not oppose them at all. Some of my best friends are atheist and we get along fine. In fact some atheists have even solidified my own belief through intellectual discussion. (of course this isn't the place have this )
So I hope that no one has a negative opinion of me now because of who I am and if you do this is the reason why I kept it hidden for so long. These opinions will never come up again as I'm only saying this once and never again. Lastly I will restate that we need to keep our opinions away from omni as this is where many people come to seek refuge from their hellish life.
Something I'm wondering about is why they chose to add a 0D compression requirement in 3.0.2, blocking all of our Lua programs, but then give us a method to create 0D-compressed files so that we can use Lua again...
It's not because they're to 3rd party Lua (Well for now at least) it's because they want to stay in control. By adding the compression step it is easier for them to manage how much development we do. If teachers start complaining about Lua, then TI might require a license to develop programs which they could do easily. Honestly the worst-case scenario is if we get ndless through Lua. If that happens TI will drop it for sure.
I'm running the beta version now. Unless there have been any major changes in the past 2 weeks then I'll skip this until I have more time to copy all of my files over.
Alright I have a conversion from C to asm. It is get pixel and is as fast as possible and can be no more optimized. Unless gcc automatically handles the zero extension which I'll have to check.
Is it just me or does this routine not handle multiplying by 2 to index the array?
That is a very valid concern there. I was just umm testing you to see if you would umm catch it Unless your image buffer was 256 colors there would be a failure. Routine now fixed. I'll disassemble the results to see how gcc handles inline functions so I can optimize it.
short GetPixel(short x, short y) { MOV.W (width),R2 ;get screen width of 384 * 2 MOV.L (VRAM),R3 ;get VRAM buffer location, usually 0xA8000000, but uses pre-initialized global variable just in case. MULU.W R2,R5 ;unsigned 16 bit multiplication SHLL R4 ;single left bit shift which multiplies R4 by 2. Also used to fill slot before the MAC load STS MACL,R2 ;load result of multiplication into R2 ADD R3,R2 ;add VRAM base address to resulting y value ADD R4,R2 ;add modified x value to to the already added y and VRAM base MOV.W @R2,R0 ;Load word from what's at R2 into R0. Sign extension RTS ;delayed branch and return. Note, R0 not touched because the result of the previous instruction is still be loaded EXTU.W R0 ;safe to touch R0 now. Get rid of that pesky sign extension. May remove later if gcc handles this step on its own align.4 width: word 384 * 2 VRAM: long VRAM_address ;global variable that was initialized earlier to correct address. }
Alright I have a conversion from C to asm. It is get pixel and is as fast as possible and can be no more optimized. Unless gcc automatically handles the zero extension which I'll have to check.
Test a pixel of CURRENTLY rendered VRAM image (z80man optimized)
Good information there. One thing I was wondering was how to properly write inline asm functions for gcc. It is not the keyword inline that I'm having issues with, but just how the asm needs to be formatted. In a normal function I use RTS once it is finished, but on an inline function do I just skip that? Also I know gcc has some special rules when inserting x86 code into a program, but so far it doesn't seem like Super H gcc has that.
Yeah I remember that. Anyway one idea I had for example would be if the Prizm supports X=, we could use 4 lines to form dungeon walls or something, although in some cases it might not be super practical, plus it would be slow.
There is x= but I need to check if you can draw y= and x= at the same time. For something like that though I would recommend using the plot functions as though are probably faster. Graphs seem to be best for inequalities as they can do special color combinations. Dynamic graphs don't support inequalities but can quickly draw complicated animated effects one the the pre-rendering has finished. Also note that you can load a background image on all graph operations. I do have a pretty cool program already that uses dynamic graphs in which the camera quickly runs down a 3D tunnel. I'll post that soon once I clean it up a little.
We could make are own image converter pretty easily, but no one has bothered to do so yet. They actually have pretty good compression because g3p has 256 colors with a palate.
This is useful because with Obliterate, about 5/6 of the file size is image data. Actually with my ongoing shell project I was planning on adding shell calls for compresses image formats. The idea is that you would pass the filename of an image or a pointer to it and the shell would then return a pointer to the converted 16 bit image. There would only be one argument necessary as the the x and y values can be determined from header. Formats that I want to include are .png .gif .jpg and .bmp
Please, use Syscall 0x01E6 to obtain the VRAM address. Interface: void *GetVRAMAddress(void);
Due to my dislike of any syscalls I will just write a routine that does the exact same thing and polls the same address from ROM. It sounds foolish, but that is just the way I roll
Note: I will go as far as file systems and text routines when it comes to avoiding syscalls.
Yes the game still has much more work to do as there are some bugs and the AI and some of the physics are not implemented yet. It does though give a good representation of what is possible on the Prizm and future games we will see.
Well usually you just need to copy/paste so it isn't too much time-consuming, although if you have to post on like 4 forums it can take a long while, especially if one of them takes a long while to load. (United-TI, for example, which takes between 10-20 seconds per page)
That's why a love Omni so much, it's the fastest forums around And with posting on other forums I only cross post on Cemetech because that is really the only other active Prizm forum now. The only thing I have to change is my excessive use of smilies