pouët.net

Go to bottom

128 bytes demos and file headers on various systems

category: code [glöplog]
I don't think Hitler had any cows, he a was vegetarian who didn't like milk, no?
added on the 2011-05-19 12:37:14 by quisten quisten
I'd imagine he supported the meat industry, though. Given they were slaughtering Jewish cows.
added on the 2011-05-19 12:39:10 by ferris ferris
Quote:
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).


Quote:
128 bytes or bust. If your system requires a header, deal with it, or find another system.


Quote:
For the CPC that's a problem.
The header of a single binary file is 128b alone


So, mutli-platform 128b compo, CPC coders get 0b to write their demo in. They just get told to fuck off and change platform. Personally I find that just slightly unreasonable.

In a platform specific compo the size limit has to be fixed, but for multi-platform, especially at these tiny sizes, I don't see how you can ignore the headers. Which is what the thread was all about...
added on the 2011-05-19 12:41:14 by psonice psonice
I too call horses to my cows! Just like John Hitler! Goddamn cows.. parading around the place like they own it! Just like Heather!
added on the 2011-05-19 12:42:54 by okkie okkie
psonice: Nothing is stopping them from having their own separate compo in this purely hypothetical situation, but it should perhaps be called 160b CPC intro or something :) . You don't see VCS or SNES coders running around complaining that they can't make anything below 4k or 32k respectively, do you?

There's nothing wrong with learning a new system anyways. It's fun and you can get a lot out of it. In fact I would highly recommend it to any coder, CPC or otherwise (and the best part is, most sceners know a few anyways, so this entire conversation is pointless).

Back to Heather, Hitler, and new CPC startup routines. Perfectly relatable subject matter for everyone in the family.
added on the 2011-05-19 12:50:04 by ferris ferris
Ferris: actually, you can make 1k stuff on the VCS (but not below that) ;)
added on the 2011-05-19 12:54:09 by visy visy
THAT would be an interesting compo - VCS 1k :) More than enough space for a modest kernel and music routine.
added on the 2011-05-19 12:58:59 by ferris ferris
ferris: nothing wrong with learning a new system, but some people really like their plaform, know it well, and would like to contribute to this hypothetical compo with a demo for it.

If it's multiplatform, and some platforms have a disadvantage like this that's completely unrelated to the code/demo compo, why not make it more fair and open? I mean if you do that, you're making the competition better by at least comparing 128b of code on each box.
added on the 2011-05-19 14:13:19 by psonice psonice
Assuming that the people entering such a compo know their systems so well, we can conclude that this compo would only serve to prove which system has the best opcode size/output ratio. Doesn't sound very fun to me since that reduces the compo to a "my system is better than your system" debate, instead of comparing actual coding skill and creativity. But the fact is that 128 bytes intro means 128 bytes intro. A single file which can be considered executable on a given platform in no more than 128 bytes. If a file requires overhead to be considered executable (aka a header), it should be part of the 128 bytes. End of story.
added on the 2011-05-19 14:33:30 by ferris ferris
Quote:
If a file requires overhead to be considered executable (aka a header), it should be part of the 128 bytes. End of story.


Thread can be closed now, all has been said.
added on the 2011-05-19 14:52:51 by StingRay StingRay
Instructions on Amiga are at least 2 bytes, on PC 1 byte. So an Amiga 256b intro must be equal to a PC 128b intro!!!11 \o/

128b = 128b = 128b.

Close thread now.
added on the 2011-05-19 15:20:39 by scicco scicco
what Ferris said.

its the executable. Let me said it again: "THE EXECUTABLE" that is the size which are measured. its been like this since the age of the demoscene. if you can't code a 128b intro because a header size takes to many bytes, then im so sorry.. that system/platform should exclude 128b intro/compo or whatever. just deal with it.
added on the 2011-05-19 15:31:10 by rudi rudi
Quote:
128 bytes intros are 128 byte intros, not 128 + heather.


so ...
BB Image + BB Image

is not allowed

...crap, it's really time to go home and make the first batch of strawberry-jam of the year
added on the 2011-05-19 15:39:44 by d0DgE d0DgE
I agree with iq et al: The size limit of an intro applies to the size of the file. There are (at least) two good reasons for this:

1. Tradition. It has always been like this in the demoscene.
2. I have yet to see a system where the space in the header can not be somehow exploited. This makes it very hard to define exactly what you can and cannot do with your header and still claim that your intro can be considered within (file size) minus (header size) bytes.

This being said, I don't see a serious problem with some party (say, Outline) having a "128 bytes of code+data" compo. They will not in general be able to verify that the code does not exploit the space in the header (not before the compo, anyway), so they will have to take the authors word for it. Cheaters will be exposed eventually.
added on the 2011-05-19 15:48:27 by Blueberry Blueberry
Quote:

If it's multiplatform, and some platforms have a disadvantage like this that's completely unrelated to the code/demo compo, why not make it more fair and open? I mean if you do that, you're making the competition better by at least comparing 128b of code on each box.


HTF can you compare a C64 128b to a PC 128b to an Amiga 128b ANYWAY?! Makes absolutely NO sense to me...
added on the 2011-05-19 15:52:49 by raer raer
...because the platforms are totally different anyway giving you different problems and possibilities...
added on the 2011-05-19 15:55:09 by raer raer
exactly what rär said.
added on the 2011-05-19 15:57:19 by rudi rudi
@baah: Except for Atari ST+CPC 128 bytes is quite fair for all other platforms from my point of view. Below 128 bytes a missing byte really hurts. Atari 8-bit uses 6 bytes executable header ($ff,$ff,startlo,starthi,endlo,endhi) to run from Game Dos menus. An executable which runs from any DOS 2.5 compatble DOS would even required 6 bytes more for the run address specification, i.e. 12 bytes header.

When I created Wallflower XL I was dreaming "If only I had a C64 header - 23% more code in only 4 bytes". But hey, this is Sparta and so I had to deal with it ;-)

@d0DgE: Priceless, btw.
added on the 2011-05-19 16:01:48 by JAC! JAC!
I fully agree with all that, except in the context of a multi-platform compo. If machines have different hardware specs/instruction sizes/whatever, that's a hardware thing, you'll have to live with it and hope the audience can judge it. Or, pull a cheesy joke prod to please the crowd.

But the header? It's not a hardware thing, it's just a shitty thing that wastes space at the start of your file. It just makes it much harder to compete in a multi-platform compo, to the point where it's completely impossible to enter on some platforms. Why not make an allowance for that, in just that one exceptional circumstance?
added on the 2011-05-19 16:30:50 by psonice psonice
2x2c from me:

1. The header size is completely aside the point. All platforms have various differences - let's say your platform has 0 byte header but setting up graphics mode takes 200 bytes - you're out of luck nevertheless.

So, 128B = 128B = 128B. Some platforms just won't work. Sorry.

2. Nobody has talked about a possible workaround, which would be to produce 128B app launchers for each platform. These app launchers would set up a known state suitable for each platform, load binary to a location suitable for the platform and jump to said address. Problem solved.

"Known state" would be a matter of debate, of course. On x86 windows this could mean even having opengl set up as an extreme example. Which is totally ok, as long as that's agreed upon.
added on the 2011-05-19 17:18:53 by sol_hsa sol_hsa
And to contribute to the original question:

Amiga executable

24 bytes + 12 bytes per section (i.e. minimum 36 bytes). There is no space to put anything interesting into the header, but code can read the size of the section it is in and the pointer to the next section, so sections can effectively be used as a cheap way to allocate memory. In principle you could also put useful data into the section size.


Amiga bootblock

12 bytes, consisting of dostype, checksum and root block location, 4 bytes each. The dostype is a fixed string ("DOS" followed by a byte describing the file system variant) and thus not very useful. The checksum must be (IIRC) $ffffffff minus the sum of all other longwords in the bootblock. The root block location is usually 880 but could be set to other values if the disk is not used for file storage. The bootblock code follows the header directly in memory and can thus read the header using PC-relative addressing.
added on the 2011-05-19 17:41:36 by Blueberry Blueberry
FUCK HEATHER!!! \o/ ;)

... sorry. B
added on the 2011-05-19 18:14:13 by elfan elfan
My original post was (partly) motivated by the following question asked by Blueberry, in outline 2011 thread
Quote:

A couple of 128-byte questions:
Is an Amiga bootblock where only the first 128 bytes are used (i.e. the remaining 896 are zero) eligible for the 128-byte compo?


But i think he answered himself to his question just above:
Quote:

I agree with iq et al: The size limit of an intro applies to the size of the file.

128 b != 1Kb... ;p
added on the 2011-05-19 18:44:25 by baah baah
The arguments most of you point out sounds very sensible to me, and i agree to them!

I think there is just one argument lacking, and i hope it can sound sensible too...

As a tiny coding lover i want to see as much productions as possible (and i think the organiser of a party/compo will agree). If we say 128b=128b you exclude a lot of possibilities (as was said by others), if we say 128b=128b + Heather (or any other good looking girl for that matters) we can have Blueberry, CPC lovers, etc... take part in a compo, and that is something i'm looking for!

Anyway, the organiser of a compo will decide. He can say 160 b Atari ST, and accept no other entry, he can say 128 bytes or bust ((c) Ferris), or even consider 128b+header, or Atari=160b while others=128b, or whatever. Wicked hackers will probably succeed to fool us with the header, but well, don't we love hacking?
added on the 2011-05-19 18:57:44 by baah baah
Err... And to be fair with Blueberry he also said:
Quote:
This being said, I don't see a serious problem with some party (say, Outline) having a "128 bytes of code+data" compo. They will not in general be able to verify that the code does not exploit the space in the header (not before the compo, anyway), so they will have to take the authors word for it. Cheaters will be exposed eventually.

Sorry for not reading correctly at first!
added on the 2011-05-19 19:42:02 by baah baah

login

Go to top