I'm confused by the first paragraph in the linked page. It says that the location of the the rom metadata is at the address that's at offset 0001 in memory. However, looking at https://git.sr.ht/~rabbits/noodle/tree/main/item/src/noodle.tal, that doesn't seem to be the case.
@alderwick it also shows how to add extra fields (like UXN version) via a write to a metadata device port, again in a standard 6 byte chunk @neauoire @tty
Oh! I was going to ask if the manifest could end with a double 00, so it's trivial to make extensions for it. The examples already do that, but if that's the intention then it'll be great to add some body text to clarify it.
Oh that makes sense, but makes the extensions I had in mind harder 🧐
I was thinking [4 * cstring, non-zero extension bytes, 00], but your while loop would read those extension bytes as another string.
So we could move to [4 * cstring, 00, non-zero extension bytes, 00], which means in the standard case (no extension bytes) we finish with three consecutive 00s rather than two. Does that sound a bit ridiculous by now, or is it doable?
So, this whole thing doesn't require any change to the assembler. It uses just an old boring ;label reference.
That label can be named anything, the ;meta #f0 DEO2, is kind of like setting a vector, but we're not worrying about that right now, #f0 is a non-specified device in Varvara.
The assembler sees ;meta, and write the position of the @meta label, which could be any other name too.
When you assemble a rom, all the ;labels are resolved to actual addresses, they're constants. And they can be seen in the assembled rom as real addresses.
In this image, I'm looking at the assembled nasu rom, and the address of ;meta, solved to the address of the @meta label in the program. So an external program can look for the second and third byte of that program, and go to that specific address in the rom, and can expect to find the meta data.
nop, this is absolutely not required, and doesn't require any change to emulators. It's only if someone feel inclined do add some meta data, it will be ignored as writing to an unknown device.
Would you be interested in a wiki patch that tries to make this clearer? It's possible I'm an outlier, but I've written a fair amount of uxn and that was NOT obvious to me hehe
˗ˏˋ Kot Lasu ˊˎ˗
in reply to Devine Lu Linvega • • •Kira, feral fox 🦊 🏳️⚧️
Unknown parent • • •~rabbits/noodle: src/noodle.tal - sourcehut git
git.sr.htDevine Lu Linvega
Unknown parent • • •⛧ esoterik ⛧
in reply to Kira, feral fox 🦊 🏳️⚧️ • • •DHeadshot's Alt
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to DHeadshot's Alt • • •Devine Lu Linvega
Unknown parent • • •a0 XX YY f0 37
The metadata address is located at location XXYY
Andy Alderwick
in reply to Devine Lu Linvega • • •a0 XX YY 80 f0 37
but yes, this means a nice consistent header for supported ROM files, without anything special needed in emulators!
Devine Lu Linvega
in reply to Andy Alderwick • • •Devine Lu Linvega
Unknown parent • • •⛧ esoterik ⛧
in reply to Andy Alderwick • • •Andy Alderwick
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Andy Alderwick • • •~rabbits/nasu: src/nasu.tal - sourcehut git
git.sr.htAndy Alderwick
in reply to Devine Lu Linvega • • •I was thinking [4 * cstring, non-zero extension bytes, 00], but your while loop would read those extension bytes as another string.
So we could move to [4 * cstring, 00, non-zero extension bytes, 00], which means in the standard case (no extension bytes) we finish with three consecutive 00s rather than two. Does that sound a bit ridiculous by now, or is it doable?
Devine Lu Linvega
in reply to Andy Alderwick • • •In any case, I just wanna wait and see what people build with this before going further I think.
Andy Alderwick
in reply to Devine Lu Linvega • • •tbsp
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to tbsp • • •Devine Lu Linvega
Unknown parent • • •https://git.sr.ht/~rabbits/nasu/tree/main/item/src/nasu.tal#L1389
The #f0 is only so the emulator can also become aware of that metadata. For example, to rename the window, to draw an icon, etc..
~rabbits/nasu: src/nasu.tal - sourcehut git
git.sr.htDevine Lu Linvega
Unknown parent • • •https://git.sr.ht/~rabbits/nasu/tree/main/item/src/nasu.tal#L30
~rabbits/nasu: src/nasu.tal - sourcehut git
git.sr.htDevine Lu Linvega
Unknown parent • • •a0 XX YY 80 f0 37
The metadata address is located at location XXYY
Devine Lu Linvega
in reply to Devine Lu Linvega • • •Andy Alderwick
in reply to Devine Lu Linvega • • •|0100
;my-metadata #f0 DEO2
@on-reset
;0123 .System/r DEO2
[…]
and the assembler does the rest.
Devine Lu Linvega
Unknown parent • • •Devine Lu Linvega
Unknown parent • • •So, this whole thing doesn't require any change to the assembler. It uses just an old boring ;label reference.
That label can be named anything, the ;meta #f0 DEO2, is kind of like setting a vector, but we're not worrying about that right now, #f0 is a non-specified device in Varvara.
The assembler sees ;meta, and write the position of the @meta label, which could be any other name too.
https://git.sr.ht/~rabbits/drifblim/tree/main/item/src/drifblim.tal#L446
~rabbits/drifblim: src/drifblim.tal - sourcehut git
git.sr.htDevine Lu Linvega
Unknown parent • • •~rabbits/nasu: src/nasu.tal - sourcehut git
git.sr.htDevine Lu Linvega
Unknown parent • • •In this image, I'm looking at the assembled nasu rom, and the address of ;meta, solved to the address of the @meta label in the program. So an external program can look for the second and third byte of that program, and go to that specific address in the rom, and can expect to find the meta data.
https://git.sr.ht/~rabbits/potato/tree/main/item/src/potato.tal#L408
~rabbits/potato: src/potato.tal - sourcehut git
git.sr.htDevine Lu Linvega
Unknown parent • • •Devine Lu Linvega
Unknown parent • • •Devine Lu Linvega
Unknown parent • • •Devine Lu Linvega
Unknown parent • • •Kira, feral fox 🦊 🏳️⚧️
Unknown parent • • •Devine Lu Linvega
Unknown parent • • •https://github.com/XXIIVV/oscean/blob/main/src/htm/manifest.htm
oscean/manifest.htm at main · XXIIVV/oscean
GitHubDevine Lu Linvega
Unknown parent • • •Devine Lu Linvega
in reply to Devine Lu Linvega • • •⛧ esoterik ⛧
Unknown parent • • •[1] http://plastic-idolatry.com/erik/nxu/uxnmeta
⛧ esoterik ⛧
Unknown parent • • •⛧ esoterik ⛧
Unknown parent • • •Kira, feral fox 🦊 🏳️⚧️
Unknown parent • • •https://git.sr.ht/~rabbits/noodle/tree/main/item/src/assets.tal#L67
~rabbits/noodle: src/assets.tal - sourcehut git
git.sr.htDevine Lu Linvega
in reply to ⛧ esoterik ⛧ • • •