pouët.net

Go to bottom

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.

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...
added on the 2011-05-18 20:42:31 by baah baah
You've got a point there. I guess. 13 to be precize.
added on the 2011-05-18 20:52:43 by w00t! w00t!
Not so sure... Speaking about noist and its 32+50=50 bytes count, Stingray said:
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)...
added on the 2011-05-18 21:09:28 by baah baah
Frankly, if it wasn't for a couple of them on MS-DOS i think 128 bytes effects (and smaller) would be totally hopeless.
added on the 2011-05-18 21:15:19 by hitchhikr hitchhikr
PigXLs or are not M$DO$...
added on the 2011-05-18 21:27:08 by baah baah
..or virtual 303...
added on the 2011-05-18 21:27:53 by baah baah
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.
added on the 2011-05-18 21:31:35 by havoc havoc
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?
added on the 2011-05-18 21:38:47 by baah baah
128 bytes or bust. If your system requires a header, deal with it, or find another system.
added on the 2011-05-19 01:38:19 by ferris ferris
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 :) .
added on the 2011-05-19 01:42:53 by ferris ferris
Ah, here we are:

Code:0073-008A 115-138 CHRGET subroutine; get Basic char


Loads over the end of that routine, it seems (Wallflower loads into $007c).
added on the 2011-05-19 01:48:41 by ferris ferris
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.
added on the 2011-05-19 08:23:03 by iq iq
what iq and ferris said.
added on the 2011-05-19 08:47:27 by nosfe nosfe
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.
added on the 2011-05-19 08:49:18 by Optimus Optimus

not every platform can do every possible kind of prods.
added on the 2011-05-19 08:54:26 by nosfe nosfe
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. :)
added on the 2011-05-19 09:14:42 by ferris ferris
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 :))
added on the 2011-05-19 09:56:04 by Adok Adok
Another solution would be to write your CPC intros for CP/M. Haven't tried that. Could be fun?
added on the 2011-05-19 10:12:19 by Optimus Optimus
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.
added on the 2011-05-19 10:16:27 by Adok Adok
what ferris, iq and nosfe said.
added on the 2011-05-19 10:25:55 by raer raer
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.
added on the 2011-05-19 10:36:43 by Psycho Psycho
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 :\
added on the 2011-05-19 11:51:23 by p01 p01
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!
added on the 2011-05-19 12:03:35 by okkie okkie
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:

Quote:
John have 4 cows and 6 horses, but he calls "horses" to his cows. How many horses have John?
added on the 2011-05-19 12:13:31 by texel texel
Quote:
How many horses have John?


Right out of the dirty mind of an iq test author, I'd say.
added on the 2011-05-19 12:31:43 by kb_ kb_

login

Go to top