There is a super small comment bug in https://github.com/CE-Programming/toolchain/blob/master/CEdev/lib/src/libraries/graphics_src/graphx/v2/graphics_lib.asm
Look at line 317, it says "FillRectangle" is unclipped, while I think that is clipped Wink
seanlego23 wrote:
So my newer computer will let me download the toolchain. However when I try to extract everything from the .zip folder, the virus protection software will delete some of the bin files, or windows will tell me I don't have the permissions to extract some of the files and will not let me have them. Specifically, it will not let me extract any of the ez80 execution files. There's got to be a way to change my computer settings so it lets me, but I don't know how. Any ideas?

MateoConLechuga wrote:
So I know not A) What computer you have, B) What version of Windows you are running, C) What virus protection software you have, and D) What you have done to try and fix it. Yeah, I have no idea how to help you; maybe you should spend some time exploring your own system and figuring things out for yourself

A)Windows 10 Lenovo ideapad Y700
B)Windows 10
C)Webroot Secure Anywhere
D)I have tried messing with the Windows settings. I don't think it's the virus protection software because the computer says I need administrative access. I click Continue, but then it fails. I am the administrator of my computer.

Edit:
Actually, the Virus Software says that all of the .exe files that are prefixed with ez80, are threats to the computer.
seanlego23 wrote:
Edit:
Actually, the Virus Software says that all of the .exe files that are prefixed with ez80, are threats to the computer.

From the first link I googled; this is the image that came up:

https://webroot.i.lithium.com/t5/image/serverpage/image-id/18735iD7515ED4C16BDE51/image-size/original?v=mpbl-1&px=-1

Just fix your silly antivirus software. Smile Also remember that security is an illusion concocted by big business to get you to buy stuff Smile
Okay, so this is a nice little breakdown of what is new and fixed, so update the toolchain and libraries whenever you get a chance Smile

Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Libraries: https://github.com/CE-Programming/libraries/releases/latest

1) v3 of the graphx library fixes many persistent bugs and introduces new features such as clipped text.
3) The installation method on windows is now easier than ever, just a double click to run a program and the environment variables will be configured.
3) Wiki pages have been added to the toolchain wiki to describe how to build your first program and more.
4) ConvPNG has been updated to fix some issues with compressed sprites

If you would like to add to the toolchain wiki, feel free! It is open to all Smile

Enjoy everyone; I think other than continued optimizations of library functions, that there isn't much else to add unless you all keep up with the requests Razz

Some eye candy:
And not to let the linux installation become to hard compared to windows, run this script to update and install the toolchain, as well as set up the environment variables. There is a wiki page here.


Code:
cd ~/
if [ ! -d "CEdev" ]; then
   echo "$(tput setaf 2)Checking for CEdev Directory... Didn't find it."
   echo "$(tput setaf 3)Updating Path and Creating Environment Variables..."
   echo "export CEDEV=~/CEdev/" >> ~/.bashrc
   echo "export PATH=$PATH:~/CEdev/bin/" >> ~/.bashrc
else
   echo "$(tput setaf 2)Checking for CEdev Directory... Found it."
fi
echo "$(tput setaf 3)Downloading the SDK...$(tput setaf 1)"
wget $(curl https://api.github.com/repos/CE-Programming/toolchain/releases/latest -s| grep browser_download_url | awk '{ print $2; }' | tr -d \",) -q
echo "$(tput setaf 2)Unzipping...$(tput setaf 1)"
unzip -o -q CEdev.zip -d ~/
echo "$(tput setaf 2)Removing CEdev.zip$(tput setaf 1)"
rm CEdev.zip
echo "$(tput setaf 6)$(tput bold)C SDK Installed!$(tput bold)"


EDIT: And before you go all out saying something about it not working on some systems or something, I'm trying to figure that out Razz
A minor bug was fixed in gfx_TilePtr.

Download: https://github.com/CE-Programming/toolchain/releases/latest
A minor bug was fixed when drawing tilemaps; sometimes an off-by-one pixel deviation might occur. Also demo_2 of the toolchain which didn't compile because it used old code now does.

Download Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Download Libraries: https://github.com/CE-Programming/libraries/releases/latest
It seems _FillCircle_NoClip is broken. At first it displays a rectangle for small radii, like 2. Secondly, the x-pos is broken, any value larger than 255 will fail Wink
What is the use of the functions in the format.h header? I couldn't find anything on them in the toolchain.
seanlego23 wrote:
What is the use of the functions in the format.h header? I couldn't find anything on them in the toolchain.

Implementing your own printf routines and whatnot; though there isn't much point.
Hey there -- I'm trying to access the entries in the buffer directly. I've tried everything I can think of, but to no avail. At the moment, I'm doing something like this:

Code:
uint8_t temp[240];

for (i = 0; i < 240; i++)
{
     temp[i] = *((uint8_t*) (0xE30014 + 319 + 320*i));
}

To get the rightmost column of the buffer. I have to cast the address as a pointer, otherwise it throws an error and won't compile.

Could you tell me what I'm doing wrong, please?
90259025 wrote:
Could you tell me what I'm doing wrong, please?
Can you tell us what makes you think it's wrong?

Just browsing the include file though, what you're doing doesn't make much sense for what you say you want to do.

Code:
uint16_t *vram = (uint16_t*)0xD40000
uint16_t temp[240];

for (unsigned i = 0; i < 240; i++) {
    temp[i] = vram[319 + (320 * i)];
}

Reading LCDLPBASE might be what you intended, but that's only helpful if you're multi-buffering.
Sure. Sorry, I should have been more clear.

I'm trying to make a sidescrolling sort of game. I'm generating the world in the buffer first so that I can procedurally generate sprites without them popping in on the screen.

The way I have it set up, at some point I have to copy either the rightmost column of the screen or buffer to a variable in order to make everything work. I've tested my memset_fast(temp) code, and it works -- so if the writing is fine, the problem must lie in the reading.

I think my code is wrong because it displays a column of seeming random colors instead of the world I'm looking for. Looking at graphx.h, it seems the starting address for the buffer is 0xE30014, so I'm trying to add 319+320*i to that in order to access the rightmost column. However, I can't seem to get this to work in its current form.
So I have been thinking about this question for some time, and the standard C solution is pretty great. What you are currently doing is offsetting from the pointer to the buffer. 0xE30014 stores the location of the array -- not the array itself. Also, your code is going to be really slow because you are performing a multiplication inside of an intensive graphics loop. (Same applies to Tari, whose code is used for reading directly from a 16bpp data array rather than the 8bpp graphics you are using). If you really want to use the direct C solution, an option might look like this:


Code:
    uint8_t *buffer;
    uint8_t i;
    uint8_t temp[LCD_HEIGHT];
    // some code...
    buffer = ((uint8_t*)(*(uintptr_t*)0xE30014));
    for (i = 0; i < LCD_HEIGHT; i++) {
        temp[i] = *(buffer + 319 + LCD_WIDTH*i);
    }


Still slow, but it does what you want. A more optimal solution:


Code:
    uint8_t *buffer;
    uint8_t i;
    uint8_t temp[LCD_HEIGHT];
    // some code...
    buffer = ((uint8_t*)(*(uintptr_t*)0xE30014)) + 319 - LCD_WIDTH;
    for (i = 0; i < LCD_HEIGHT; i++) {
        temp[i] = *(buffer += LCD_WIDTH);
    }


Although this is more optimal, it still may not be exactly perfect in terms of speed. Perhaps a combination of gfx_GetSprite or something like that might be a little better; however the second code block should be good enough for what you need. You may even want to do something like:


Code:
#define MY_BUFFER ((uint8_t*)(*(uintptr_t*)0xE30014))


In order to clean things up a little. Hope this answers the question, and good luck! Smile
Interesting! I'm not near my computer at the moment, so I can't try it now, but for the gfx_GetSprite method, I would make a 1*240 transparent sprite, and then call gfx_GetSprite(sprite_buffer, 319, 0), right?
90259025 wrote:
Interesting! I'm not near my computer at the moment, so I can't try it now, but for the gfx_GetSprite method, I would make a 1*240 transparent sprite, and then call gfx_GetSprite(sprite_buffer, 319, 0), right?

Basically yep. Something like this:


Code:
    gfx_image_t *sprite_buffer = gfx_MallocSprite(1, 240);
    gfx_GetSprite(sprite_buffer, 319, 0);


Then you can just use:


Code:
    sprite_buffer->data


To get the array of data there. Smile Don't forget to free(sprite_buffer) at some point.
Updated to fix some issues with creating the object directory:

https://github.com/CE-Programming/toolchain/releases/latest

That should help if your computer is silly Razz
This isn't really an issue as much as a preference. When I look at the .src files in the obj folder after I compiled, sometimes the asm code is above the commented C code a couple lines. I don't know if that's fixable or what. Just thought I'd let you know.
JWinslow was looking for some lighten/darken routines for the color format; began work on graphx v4 which adds gfx_Darken and gfx_Lighten, which work on 1555 formatted colors.



Any other suggestions for this new library version are welcome Very Happy
I don't know if this is possible, but what about a clipping window that isn't a rectangle, but a circle? I just think that might be cool if someone wants to create a game where they're in a tunnel or something and you can only see so much around you.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3 ... 10, 11, 12 ... 15, 16, 17  Next
» View previous topic :: View next topic  
Page 11 of 17
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement