#14481 - animension - Wed Jan 07, 2004 7:19 am
Tepples,
I decided to give your GBFS library a try and I ran into some problems using it. In my make file I have the following entry:
which compiles the ROM image, creates the GBFS archive file, and concatenates it to the end of the ROM image. I've opened the actual concatenated ROM image in a text editor to see that the "PinEight" string is there as well as the contents of the file. The CPP code I'm using to try and access the content of the file is:
While this code does use HAM, it's only to display address information to see whether or not a valid address returns from either find_first_gbfs_file() or gbfs_get_obj(). What happens is that both addresses show up as 0, or are NULL pointers. I can't see what's going wrong, seeing I studied your demo that uses it, and I'm doing or at least I *think* I'm doing the exact same thing.
Did I miss something?
_________________
"Beer is proof that God loves us and wants us to be happy."
-- Benjamin Franklin
I decided to give your GBFS library a try and I ran into some problems using it. In my make file I have the following entry:
Code: |
GBFS_OUTFILE = archive.gbfs GBFS_INFILES = \ module.it all : $(PROGNAME).$(EXT) clean gbfs.exe $(GBFS_OUTFILE) $(GBFS_INFILES) cmd /c "copy /b /y $(PROGNAME).$(EXT)+$(GBFS_OUTFILE) TEMP.$(EXT)" cmd /c "move TEMP.$(EXT) $(PROGNAME).$(EXT)" |
which compiles the ROM image, creates the GBFS archive file, and concatenates it to the end of the ROM image. I've opened the actual concatenated ROM image in a text editor to see that the "PinEight" string is there as well as the contents of the file. The CPP code I'm using to try and access the content of the file is:
Code: |
// C++ CODE WHICH USES EXPLICIT CASTS unsigned int file_length = 0; const GBFS_FILE *myfile = find_first_gbfs_file((const void *)find_first_gbfs_file); const char *module = (const char *)gbfs_get_obj(myfile, "module.it", &file_length); ham_DrawText(0,0,"LENGTH:%d",file_length); ham_DrawText(0,1,"FILE ADDRESS:%x",myfile); ham_DrawText(0,2,"MODULE ADDRESS:%x",module); |
While this code does use HAM, it's only to display address information to see whether or not a valid address returns from either find_first_gbfs_file() or gbfs_get_obj(). What happens is that both addresses show up as 0, or are NULL pointers. I can't see what's going wrong, seeing I studied your demo that uses it, and I'm doing or at least I *think* I'm doing the exact same thing.
Did I miss something?
_________________
"Beer is proof that God loves us and wants us to be happy."
-- Benjamin Franklin