Call for participation: 256 bytes collection

In this forum you can write about anything that does not fit in other forums.
This includes generic Oric talkings and things that are totaly unrelated but want to share with people here :)
Post Reply
User avatar
Dbug
Site Admin
Posts: 3396
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Call for participation: 256 bytes collection

Post by Dbug »

Hei hei !

I wrote collection, because this is not a competion, there will be no winner, no loser, no prize :)

The other day while talking with Twilighte, I show him the 256b demo archive here: http://www.256b.com/home.php and of course I wondered what could be done on the Oric in 256 bytes.

So here is my idea: creating a compilation/collection with all the things that oric users can do in 256 bytes.

Remember these "two liners" in BASIC, that's the same, but instead of a limit in number of lines, it's a limit on the size of the program that most be at must 256 bytes long.

You can use whatever language you want, and as much memory you want :)

On this particular case, I think that BASIC programmers can do more interesting things because BASIC tend to be quite efficient on a size point of view.

Now, about the size, I guess we should count "256 bytes" without any kind of header, this way we can save the program on the disk, it will take exactly one block. That means you are not supposed to read stuff in the header to spare some room, because on the final disk the header will not be there anymore.

Concerning the subject, well you can do whatever you want, something that display japanese poetry, some demo making intro, a procedural music player, a mini game, a mini word processor, a mini paint program, whatever :)
Everything is accepted !

Does it looks like something interesting ?

User avatar
TheSpider
Pilot Officer
Posts: 71
Joined: Sat Jan 07, 2006 8:17 am
Location: Lexington, Kentucky, USA (Ex-Elgin, Scotland)
Contact:

Lineboing coming in under 256

Post by TheSpider »

Hiya Mickael,
Looks like I am first... either that or the others have some spectacular programs coming.

My entry is a stripped down version of my Lineboing program that I published a while back.
You can download it here:
http://oricspider.home.insightbb.com/so ... ING256.BAS

The only real difference is that you have to enter the PATTERN as 1-255, rather than in binary.

BOING256 actually comes in at 234 bytes on the HD.

When Euphoric starts, it says; "37631 BYTES FREE".
The following is what happens when I load the program:


Ready
PRINT FRE("")
37629

Ready
CLOAD"BOING256.BAS"

Ready
PRINT FRE("")
37424

Ready
PRINT 37629-37424
205


Coming in, well under the wire!
Peter (TheSpider) Paterson
A Scotsman in Kentucky
http://thespider.oric.org
http://mintspider.blogspot.com

User avatar
Dbug
Site Admin
Posts: 3396
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Nice animation :)

(and this is the 500th message, yeahhhhh !!!!)

User avatar
Euphoric
Game master
Posts: 99
Joined: Mon Jan 09, 2006 11:33 am
Location: France

Post by Euphoric »

Of course, we can't base on a big OpenGL or Direct3D library like most of those PC demoes... But on the other hand, 6502 code is more compact than 80x86, so those minigames like Tetris, etc. are easily reachable IMHO. Will do something when I have finished the current works... but does this mean that you take some distance with the minigame compo (4K compo is in progress), or is it just that you think that 4K or even 1K is way too big ? ;-)

User avatar
Euphoric
Game master
Posts: 99
Joined: Mon Jan 09, 2006 11:33 am
Location: France

Post by Euphoric »

Was wondering if we can directly load a 256 bytes program in zero page, and the answer is definitely yes...
Jon has a large experience of this: a program executing in zero page saves space (no need to initialize variables as they can be inserted as the operands of immediate instructions).

So, here are the constraints to consider when building your "256-bytes directly-loaded zero-page program":

- don't use location $2F, it is used by the cassette loading routine to assemble bytes, shifting bits read on tape (so, it will have a 'random' value at the end of the loading process)
- place a $0033 constant word at location $33-34, this is the address pointer used for loading each byte. This way, when the loading routine will be reading the byte destined for location $33, it won't disturb the address pointer. This word is not completely lost, though: when your program will start to run, it will contain value $0100.
- finally, be cautious with what you insert in location $12-$13. Before your program starts (and during your program execution), interrupts will be serviced and there's a small routine in rom that makes the "software cursor" blink. $12-13 contains the address of the beginning of the line where the cursor currently is, while $0269 contains the column (0 to 39). So, the byte pointed by $12-13 (plus the column number) will have its 7th bit periodically changed...

Hope this helps...

Cheers,

Fabrice

PS: of course, there are different constraints for a zero-page program stored on floppy disk...

User avatar
Dbug
Site Admin
Posts: 3396
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Fabrice: sure, definitively something interesting to consider. Of course we can also have a loader for the 256 bytes stuff, that will load the intros somewhere in memory, then SEI and copy everything to page zero, then run the program.

Anyway, here is my participation, I guess I can do better, because there is a lot of wasted room. Will try to improve on that :)

http://www.defence-force.org/ftp/forum/ ... ircles.tap

User avatar
TheSpider
Pilot Officer
Posts: 71
Joined: Sat Jan 07, 2006 8:17 am
Location: Lexington, Kentucky, USA (Ex-Elgin, Scotland)
Contact:

Post by TheSpider »

Hiya Mickael,
I like your entry.. quite an effective demonstration.
Maybe just a bit to fast though?
Peter (TheSpider) Paterson
A Scotsman in Kentucky
http://thespider.oric.org
http://mintspider.blogspot.com

Sdw
Private
Posts: 2
Joined: Wed Sep 06, 2006 10:49 am

Post by Sdw »

Hey there Dbug, thought it was better to continue this in here than on pouet.

Anyway, thanks for your help regarding the options, now my asm-file compiled to reasonable size.

I thought I wanted to check out some BASIC stuff aswell (actually it one-ups the C64 in one respect there, since the C64 didn't have any gfx-commands in the BASIC). I assume to do basic-stuff you have to code it straight in the emulator (which I tested, worked fine). However I would want to save my creations sometimes, how do I do that? Also is there a reference on the basic commands somewhere, so far I've only tested the basic stuff like PRINT and GOTO :)

User avatar
Dbug
Site Admin
Posts: 3396
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Happy to see you there :)

On this page http://oric.ifrance.com/oric/emulator.html you can download an archive of tools that includes Bas2Txt and Txt2Bas.

Using these two programs, you can edit BASIC programs on your pc with your favorite text editor, and then convert to a TAP file that you can load under the emulator.
That's really practical, because if the ORIC BASIC is quite good, the text editor is -at best- kind of weird ;)

For the user manuals, you can find some here:
http://www.defence-force.org/computing/ ... /index.htm

I unfortunately do not have the english version of the Atmos manual (that is way better than the Oric 1 manual), but well, Oric 1 BASIC is about 99% compatible with Atmos BASIC (mostly a bug correction and few added useless instructions).

Sdw
Private
Posts: 2
Joined: Wed Sep 06, 2006 10:49 am

Post by Sdw »

Cool, crossdeving with basic! :D
I played around with it for a while, and can now present the worlds first 64 byte intro for ORIC:
http://sdw.webhop.net/tmp/64bytes.tap :lol:

Well, joking aside, I'm a bit annoyed that the emu is a DOS emulator that can't run in a window, now my screen has to switch res to an appaling 320x200 60Hz everytime I want to test something.
Don't know if I will have time to play around any more with this (I have my other weird platforms to dev for, like the TI-83! :D), but it as fun to mess around with a new machine.

User avatar
Dbug
Site Admin
Posts: 3396
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Sdw wrote:Cool, crossdeving with basic! :D
I played around with it for a while, and can now present the worlds first 64 byte intro for ORIC:
http://sdw.webhop.net/tmp/64bytes.tap :lol:
Well, that's funny :)
And you even have room for colors if you want !
(just add things like CHR$(nn) to set ESCAPE codes to change the color of paper and ink to get gradients)

Thanks for having tried :)

Just downloading the stuff and trying to do something it already way more than most people do. So thanks a lot :)
Sdw wrote:Well, joking aside, I'm a bit annoyed that the emu is a DOS emulator that can't run in a window, now my screen has to switch res to an appaling 320x200 60Hz everytime I want to test something.
That's a known problem, but fortunately it seems there is some new development in the work, with some attempt at doing a fully cross platform Euphoric based on SDL.
Sdw wrote:Don't know if I will have time to play around any more with this (I have my other weird platforms to dev for, like the TI-83! :D), but it as fun to mess around with a new machine.
No problem, you are welcome :)

Post Reply