3 ms·
It's true that using a vector port for this is overkill, how would you instead tell the emulator that metadata is available?
by entaloneralie 4y ago
It's true that using a vector port for this is overkill, how would you instead tell the emulator that metadata is available?
- zzo38computer 4y agoThere are a few ways I can think: 1. Make a header similar to Game Boy. The first four bytes are jump past the header (which might also be used to define the length of the header, in case of being extended in future), and then there is some sort of logo or code to identify the presence of the header, and then the data of the header. 2. Put metadata in a separate file, to avoid using up memory in the program file. 3. Put all of the files together in a Hamster archive file. Lump names starting with a underscore can be used for the special use, e.g. "_default.rom" for the program code and "_metadata" for the metadata. In this case an extra step is required to run the program if the emulator does not support it, but I wrote a program in uxn which is capable of doing this, therefore it can be used with any implementation of uxn. So, any of these should be able to work with any emulator, even existing implementations which do not implement metadata.
- entaloneralie 4y agoI'd like for the metadata to exist in memory tho, in almost every app, I read that metadata within the rom itself, I don't want to be fetching that external file each time I need to display the about box. What we could do is just not expect the #xxxx #f0 DEO2 bytes as magic number, so you can just ";meta POP2" at the start. That wouldn't "use" anything, I mean, in its current state, it doesn't really occupy a port, vectors can always be overwritten, even if some day the #f0 device does become something, we could immediately write the same vector with another address in the reset vector.
- zzo38computer 4y ago> I'd like for the metadata to exist in memory tho, in almost every app, I read that metadata within the rom itself, I don't want to be fetching that external file each time I need to display the about box. Then, you could use my first idea, of the first four bytes skipping past the header which starts with a code to identify the header (such as ASCII text "UXN!META", or whatever else might be agreed on); this is similar to the way that the Game Boy header is working. > so you can just ";meta POP2" at the start Yes, that would also work, if it is agreed that this convention is used for that purpose.