128 bytes demos and file headers on various systems
category: code [glöplog]
When you write tiny demos such as 128b ones, some operating systems need some info bytes appended to your executable file (ST), or you need to put some extra "code" just to launch your exec in a convenient way (c64). It seems accepted that 128b demos on Atari ST are in fact 160 bytes files.
If this is to be accepted in multisystems competitions, it would be great to know what is possible on most commons systems (PC, Amiga, CPC).
I don't know much, but here's a start:
Atari ST:
32 bytes header for .PRG or .TOS programs (Can we hide infos in it?)
32+128=160 bytes
Commodore 64:
I append the following code to avoid asking for a SYS instruction by user, he can type RUN instead.
13+128=141 bytes
(I get a CPU Jam on Vice when removing the 0s, but it seems some info can be hidden there...)
Archimedes/RiscPC
All necessary information is saved in the directory, all executables are considered to start at &8000 thanks to MMU.
0+128=128 bytes
Anyone can provide better/more complete infos for those systems? Feel free to tell us about other systems.
Hope it's not completly off the mark and can be usefull for compo organisers...
If this is to be accepted in multisystems competitions, it would be great to know what is possible on most commons systems (PC, Amiga, CPC).
I don't know much, but here's a start:
Atari ST:
32 bytes header for .PRG or .TOS programs (Can we hide infos in it?)
32+128=160 bytes
Commodore 64:
I append the following code to avoid asking for a SYS instruction by user, he can type RUN instead.
Code:
org $801-2
.word $0801 ;Load adress (C64)
.word BasicEnd,2011 ;Adress of next line + line number
.byte $9e,$32,$30,$36,$32 ;Basic "SYS 2062" instruction
.byte 0 ;End of basic line
BasicEnd:
.byte 0,0,0 ;End of basic program
start:
13+128=141 bytes
(I get a CPU Jam on Vice when removing the 0s, but it seems some info can be hidden there...)
Archimedes/RiscPC
All necessary information is saved in the directory, all executables are considered to start at &8000 thanks to MMU.
0+128=128 bytes
Anyone can provide better/more complete infos for those systems? Feel free to tell us about other systems.
Hope it's not completly off the mark and can be usefull for compo organisers...
You've got a point there. I guess. 13 to be precize.
Not so sure... Speaking about noist and its 32+50=50 bytes count, Stingray said:
Also, on the c64, the fantastic Wallflower demo used only a 2 bytes header by loading the prog in zeropage at $7c (don't know why it works atm). So it might be more complex than what i stated, some people might hack a lot (not sure that's bad though)...
Quote:
You Atari ppl are weird. :)
Also, on the c64, the fantastic Wallflower demo used only a 2 bytes header by loading the prog in zeropage at $7c (don't know why it works atm). So it might be more complex than what i stated, some people might hack a lot (not sure that's bad though)...
Frankly, if it wasn't for a couple of them on MS-DOS i think 128 bytes effects (and smaller) would be totally hopeless.
PigXLs or are not M$DO$...
..or virtual 303...
Actually, having an overview of this type would be quite useful for us (read: organisers of parties with a 128byte compo tradition) indeed. If people have opinions about 128bytetro's that's good for them, or are just trying to troll, that's fine too, but not really relevant to the discussion in any meaningful way.
When i organised Codecraft 1k+4k competition, i forced people to give the code along, and that was well appreciated (we even had cooperations forming).
Maybe we can do that and ask for an hexdump too, just to check?
Maybe we can do that and ask for an hexdump too, just to check?
128 bytes or bust. If your system requires a header, deal with it, or find another system.
btw, Wallflower starts because it loads itself into the ROM vector for the end of the GETCHR(?) routine, so when the system retreives the BASIC line "RUN" (the "R" to be exact), the intro is executed. Or at least I think; I could be very wrong, but that's what I deciphered from the memory map :) .
Ah, here we are:
Loads over the end of that routine, it seems (Wallflower loads into $007c).
Code:
0073-008A 115-138 CHRGET subroutine; get Basic char
Loads over the end of that routine, it seems (Wallflower loads into $007c).
Quote:
128 bytes or bust. If your system requires a header, deal with it, or find another system.
exactly, 128 bytes intros are 128 byte intros, not 128 + heather. same applies to 1k, 4k or 64k intros.
what iq and ferris said.
For the CPC that's a problem.
The header of a single binary file is 128b alone :P
Also, in Amsdos every file displays 1k in the catalogue no matter if it's much fewer bytes.
With my 1ks on CPC though I went purist. They are 896bytes in code + 128b header and the disk catalogue displays exactly 1k and not 2k if I went over the 896b edge.
I have been asking about this here just on page 1 and then here. Basic tokens could be a way. This reminds me the C64 method.
The header of a single binary file is 128b alone :P
Also, in Amsdos every file displays 1k in the catalogue no matter if it's much fewer bytes.
With my 1ks on CPC though I went purist. They are 896bytes in code + 128b header and the disk catalogue displays exactly 1k and not 2k if I went over the 896b edge.
I have been asking about this here just on page 1 and then here. Basic tokens could be a way. This reminds me the C64 method.
not every platform can do every possible kind of prods.
Quote:
The header of a single binary file is 128b alone :P
Header injection, perhaps? Else bump it up to 256b, those are still cool.
Quote:
With my 1ks on CPC though I went purist. They are 896bytes in code + 128b header
As it should be :)
Quote:
I have been asking about this here just on page 1 and then here. Basic tokens could be a way. This reminds me the C64 method.
Good discussion. If you figure out anything I'd be very interested. :)
Quote:
exactly, 128 bytes intros are 128 byte intros, not 128 + heather. same applies to 1k, 4k or 64k intros.
I'd say the same. But on PC, programs up to a size of 64k can be written as COM files. COM files don't have a header. So it's a different situation than on those platforms where a header is required. - Nevertheless I wouldn't allow a size larger than 64k for a 64k intro just because it is an EXE file that has a header. So, to conclude, I'm with iq and Ferris on that issue. (I know, nobody cares about my opinion, but I don't care about that :))
Another solution would be to write your CPC intros for CP/M. Haven't tried that. Could be fun?
baah: I took a look at your homepage and solved your Inegalité puzzles. Wouldn't you like to join Mensa? Mensa people love solving such puzzles. The magazine of Mensa always contains tons of such puzzles, and you could contribute to it.
what ferris, iq and nosfe said.
So how many bytes would a windows (PE header) "128b" intro be? And are we allowed to store stuff in the header? ;)
128b is 128b.
128b is 128b.
What Ferris, IQ and Nosfe said.
Although I have a love story with Atari ST I always found it wrong that 128b intros are actually 160b intros there :\
Although I have a love story with Atari ST I always found it wrong that 128b intros are actually 160b intros there :\
Quote:
exactly, 128 bytes intros are 128 byte intros, not 128 + heather.
Yes! Heather always wants to be included in EVERYTHING! She's *SUCH* an attention whore it's not even FUNNY anymore!!! So just 128 bytes! Heather can go fuck herself!
File size should be always file size, not less, not more.
If you want to do a 160 bytes compo, nobody stops you to do it. Much more, if you want to do a multi-machine compo, and you want to accept 128 bytes for some systems, and 160 bytes for other systems, perfect, why not? But, the size of the prods will be, 128 and 160 bytes respectively.
I remember a funny iq test question, very related to this:
If you want to do a 160 bytes compo, nobody stops you to do it. Much more, if you want to do a multi-machine compo, and you want to accept 128 bytes for some systems, and 160 bytes for other systems, perfect, why not? But, the size of the prods will be, 128 and 160 bytes respectively.
I remember a funny iq test question, very related to this:
Quote:
John have 4 cows and 6 horses, but he calls "horses" to his cows. How many horses have John?
Quote:
How many horses have John?
Right out of the dirty mind of an iq test author, I'd say.