Joined: Thu Jan 01, 1970 12:00 am
Re: Hex values from images
Well, this is very easy. What I suggest is this, simply format your engine to take 8x8, 16x16, 32x32, whatever format bitmaps, then template them as outlined in my books and everyone elses. Now, you take that bitmap file and turn it into a stream of bitmaps in RGB format (whatever yours is), so that its one single stream of bytes, but since you know each image is 16x16 pixels, and each pixel is 1,2,3 bytes, then you know everything. Now, store that in a SD card and with your processor load the bitmap data into the FPGA's RAM during run time.
OR... IF you want these bitmaps in the FPGA FLASH rom, then this is easy as well, all FPGA tools quartus and xilinx both can load the FLASH with a binary file. Thus, on your HD you have a file for each bitmap, or the stream or the template and load it directly into the FPGA, then your verilog code can use a pointer to the base of the bitmap, and you know the data stride, line stride, and bitmap stride, this you know everything again.
So your tool chain pipelines might be:
1. Artist -> photoshop-> BMP/PNP, etc. -> convert to simple RGB or indexed bitmap (TGA, PCX, RAW), now dump files on SD, and with processor load into FPGA RAM during runtime.
2. Artist -> photoshop-> BMP/PNP, etc. -> convert to simple RGB or indexed bitmap (TGA, PCX, RAW), now dump files INTO FPGA along with verilog as a program block binary where you know the start address of the data in FLASH, etc.
Problem is you want users to be able to do this, and 1 in 10000000000 people know how to use a FPGA you need to have a tool chain and data pipeline that at worst users can just dump simple files on an SD card, they get loaded (with a convention for format, pixel size, mxn bitmap size, etc.) into your system.
In other words, you really need to make sure the FPGA is a GPU that doesn't use FLASH for data, it uses external SRAM or its internal SRAM, either way there is a way to get it into this during run time, not a program time, so users can write games without a silicon compiler.