Revolution-FX Project
#1
Posted 10 September 2007 - 03:48 AM
Downloads can be found here: http://revolution-fx.../downloads.html
Documentation has also been updated for v0.3: http://revolution-fx.../documents.html
Documentation for offline viewing and printing has also been requested. PDF versions have now been released. Download here:
#2
Posted 11 September 2007 - 11:47 AM
Planning to take on CK with this eh?
Can you show me how to get three colours happening?
i assume its something like this:
unsigned char buffer1[1024]; unsigned char buffer2[1024]; unsigned char buffer3[1024]; unsigned char box_one[16] = {0xFF,0xFF,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80, 0x0F,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80, 0x0F, 0x80,0x0F,0xFF,0xFF}; unsigned char box_two[16] ={0xFF,0xFF,0x80,0xF1,0x80,0xF1,0x80,0xF1,0x80,0xF1,0x80, 0xF1,0x80,0xF1,0x80,0xF1,0x80,0xF1,0x80,0xF1,0x80,0xF1,0x80,0xF1,0x80,0xF1,0x80, 0xF1, 0x80,0xF1,0xFF,0xFF}; unsigned char box_three[16] ={0xFF,0xFF,0x8F,0x01,0x8F,0x01,0x8F,0x01,0x8F,0x01,0x8F, 0x01,0x8F,0x01,0x8F,0x01,0x8F,0x01,0x8F,0x01,0x8F,0x01,0x8F,0x01,0x8F,0x01,0x8F, 0x01, 0x8F,0x01,0xFF,0xFF}; memset(&buffer1, 0, 1024); memset(&buffer2, 0, 1024); memset(&buffer3, 0, 1024); GrayInit3(somevalue1, somevalue2, somevalue3); GrayLinkBuffers3(buffer1, buffer2, buffer3); while (IsKeyDown(KEY_CTRL_EXIT) != 1) { DrawSprite16(52, 24, buffer1, box_one, 0); DrawSprite16(52, 24, buffer2, box_two, 0); DrawSprite16(52, 24, buffer3, box_two, 0); } Reset_Calc(); return 0;I just dont know the GreyInit3(); values required. Or am i completely off the plot alltogether!?
My project features lots of 12x12 sprites, is it possible for you to add support for this size sprite, or should i just use the 16x16 functions and squash them together, or should i use the CopyVRAM(); function?
#3
Posted 12 September 2007 - 03:41 AM
#4 Guest_krisse7_*
Posted 14 September 2007 - 01:09 PM
How do I use the serial port functions? Like this?
unsigned char r; unsigned char t = 123; Init_SerialPort(); Start_SerialPort(); while(...) r = SerialReceive(); if (r == ...) ... SerialTransmit(t); ... Stop_SerialPort();
and in the other calculator ...
unsigned char r; unsigned char t = 234; Init_SerialPort(); Start_SerialPort(); SerialTransmit(t); while(...) r = SerialReceive(); if (r == ...) ... ... Stop_SerialPort();
When I call SerialReceive() how do I know if the data returned by the function is some new data that has just arrived or some old data that I have already read with the previous call of that function and no new data has arrived?
It looks like you have to add Reset_Calc() to the end of the program so that the calculator does not freeze. But what does that function actually do? The documentation says something about erasing the contents of main memory. What kind of data is erased?
#5
Posted 14 September 2007 - 01:30 PM
When I call SerialReceive() how do I know if the data returned by the function is some new data that has just arrived or some old data that I have already read with the previous call of that function and no new data has arrived?
What you could do is also make sure that the variable is set to zero before you use SerialReceive().
r = 0; r = SerialReceive(); if (r != 0) { PrintMini(1, 1, (unsigned char *)"Received", MINI_OVER); } else { PrintMini(1, 1, (unsigned char *)"Nothing yet", MINI_OVER); }
Reset_Calc basically resets the calculator. It restarts the OS. The main memory is erased because the OS is restarted. It's not a big problem though if you don't have important things in the User RAM (64KB). You can always backup the main memories to the storage memory. But the good effect of Reset_Calc() is that it allows you to open the addin again after immediately exiting it.It looks like you have to add Reset_Calc() to the end of the program so that the calculator does not freeze. But what does that function actually do? The documentation says something about erasing the contents of main memory. What kind of data is erased?
#6 Guest_krisse7_*
Posted 17 September 2007 - 12:45 PM
#7
Posted 17 September 2007 - 11:50 PM
#8 Guest_visceroid_*
Posted 18 October 2007 - 05:05 AM
Or is my calculator too old.
I have an fx9750G, which supports basic
is C only for later calculators or something?
#9
Posted 18 October 2007 - 05:33 AM
#10
Posted 20 October 2007 - 01:55 AM
http://revolution-fx.../downloads.html
This package contains fixes the bugs in v0.3 BETA:
- string_input() can now be used multiple times within a function
- DrawLine() now fixed and draws lines properly
- Grayscale with 3 buffers engine now "flips" through all 3 buffers (pointed out by Muelsaco)
#11
Posted 20 October 2007 - 01:58 AM
i think i speak for all when i say
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
thanx
#12
Posted 20 October 2007 - 02:32 AM
Now that I got that out of the way, I can probably finish up MLC PC now.
#13
Posted 20 October 2007 - 09:38 PM
Gopher it, I've been waiting for MLC PC for ages!Lol, ok.
Now that I got that out of the way, I can probably finish up MLC PC now.
#14
Posted 29 October 2007 - 07:05 AM
Do any of you have suggestions in optimizing the functions for drawing sprites? I know that optimizations can be made.
#15
Posted 29 October 2007 - 02:44 PM
I was also thinking about some trickery using right/left shifts on the data, combined with the method I mentioned to be able to write to any x,y location, though that seems hard.
Also, the inline comments are thin. Do you want me to comment some?
#16
Posted 29 October 2007 - 05:59 PM
Note that I have _not_ tested any of this code, it compiles, but might still have something wrong Would be nice if you tested it.
Edit: I moved the assembly listing to http://casio.pastebin.com/f285df85c - also added some comments on the last listing.
Original code, 144b, 71 instructions
void PlotPixel(char x, char y, unsigned char *buffer, char draw_type) { int i=((int)x >> 3) + ((int)y -1 && y>-1 && x> (x & 7); break; } } }
+Pregenerate mask, 96 bytes, 46 instructions
The code 0x80 >> (x & 7) exists three times in the code, once is enough.
[code=auto:0]void PlotPixel(char x, char y, unsigned char *buffer, char draw_type) {
char mask;
int i;
mask = 0x80 >> (x & 7);
i = ((int)x >> 3) + ((int)y = 0 && i
#17
Posted 30 October 2007 - 04:43 AM
you lost me at, umm... the start. Im will never understand what the hell you guys talk about XD
#18
Posted 30 October 2007 - 08:28 PM
#19
Posted 31 October 2007 - 03:09 AM
I was thinking of doing that also before I started writing the graphics functions, but I also found it hard. I tried searching for algorithms on the web but couldn't find any.I think we should provide fast drawing that does not plot individual pixels, but instead copies the sprite directly to VRAM.
...
I was also thinking about some trickery using right/left shifts on the data, combined with the method I mentioned to be able to write to any x,y location, though that seems hard.
Sure, go ahead.Also, the inline comments are thin. Do you want me to comment some?
Yeah, I should probably remove the bounds checking. Thanks for doing a comparison between the different methods. I still wondering though on how to approach drawing the sprites byte-by-byte instead of bit-by-bit.Reduction from 144b/71i to 96b/46i with minimal loss of functionality. About 65% of original size. Of course, if you think it is important to keep strict bounds checking, add it . I think we should let dev's add this functionality in their code themselves if they really need it.
#20
Posted 31 October 2007 - 03:17 PM
No problem, feel free to use my snippet if it worksYeah, I should probably remove the bounds checking. Thanks for doing a comparison between the different methods. I still wondering though on how to approach drawing the sprites byte-by-byte instead of bit-by-bit.
Yes, making byte-writes work for any xy location is tricky.
One option is to limit the coordinates to coloumns and rows, where we have 16 coloumns and 64 rows. The user can then offset the bitmap data, increasing its size, in exchange for speed. There is certainly a use for this method.
#21
Posted 13 November 2007 - 09:32 AM
After having implemented greyscale support in my Casio Image Generatorprogram, I have noticed that at present, Revolution-FX only allows you to draw 8x8, 16x16 and 32x32 sprites to buffers. Is there a technical reason for this?
Cheers
#22
Posted 13 November 2007 - 08:04 PM
Yes, - those bitmaps fit nicely in memory, and a specialized function is quicker than general sprite function that can be used for sprites of any size. We should have a more general one though.[...] Revolution-FX only allows you to draw 8x8, 16x16 and 32x32 sprites to buffers. Is there a technical reason for this?
Here's some code, not tested/compiled. It can write bytes in a column/row range of 0,0 to 16,64. It can be improved, like calculating the 'current row offset' inside the for-loop statement:
void DrawSprit(int column, int row, int sx, int sy, char *src, char *dest) { int i,j; char byte; for (j = 0; j < sy; j++) { /* go through rows */ for (i = 0; i < sx) { /* for each row */ offset = (row*16) /* base row offset */ + (j*16) /* current row offset*/ + column /* base column offset */ + i; /* current row offset */ /* implement xor, or, and or whatever here: */ dest[offset] = src[offset]; } } }
#23
Posted 23 November 2007 - 04:05 AM
#24
Posted 23 November 2007 - 02:18 PM
By the way, I don't celebrate thanks giving here.
#25
Posted 25 November 2008 - 04:24 PM
so here is my problem, so you have the source code: Revolution-FX v0.3 Source Code (ZIP)
, the Latest binary release for renesas : Revolution-FX v0.3.2 (Win32 Installer) and Latest binary release for GCC: GCC Revolution-FX Complete - Pre-Initial Release (Win32 Installer).
How would i go about installing this?
and whats the thing with renesas and GCC, can someone please explain me the differnce between the 2?
#26
Posted 25 November 2008 - 11:45 PM
After downloading it, just double click on it and let it install. When it gets to the part of where you want to install it, make sure it installs where your fx-9860G SDK is installed.
Offtopic: Is that a Magic: The Gathering card I see in your avatar?
#27
Posted 26 November 2008 - 06:29 AM
http://www.casiocalc...amp;#entry46320
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users