pouët.net

Go to bottom

Tiny Intro Toolbox Thread

category: code [glöplog]
you've got mail :)
added on the 2012-05-23 22:50:15 by las las
you've got another mail. again - thank you. :)
added on the 2012-05-24 14:58:25 by las las
is there a (dos-)sizecoding irc channel?
added on the 2012-05-26 23:20:19 by quasimodo quasimodo
Nope - not yet I think. Just feel free to create one!
128.
added on the 2012-05-26 23:21:41 by las las
quasimodo: iirc #asm (efnet or ircnet, dont remember) used to have tiny intro competitions. dunno if they still are held though.
added on the 2012-05-27 01:47:38 by rudi rudi
Made simple, insanely slow and ugly sphere marcher tonight,
thanks for this thread!
youtube
added on the 2012-05-27 04:42:19 by frag frag
o.O
Just created a bootable DOS USB stick - now I can see the les bp,[bx] failing... ;)
added on the 2012-05-27 19:23:23 by las las
Quote:
Just created a bootable DOS USB stick
Nice move!
added on the 2012-05-27 19:45:08 by p01 p01
NASMIDE seems to be good enough for some minor code fixing while using the stick.
added on the 2012-05-27 19:58:42 by las las
thanks for NASMIDE link las -- that's awesome sauce
added on the 2012-05-27 23:19:59 by Fell Fell
I've found qemu to be very usable for running tiny dos intros. Depending on the intro with or without kvm (virtualization) enabled worked better. Unlike virtualbox its mode 13h emulation isn't limited to 0.000001fps and unlike dosbox it supports many (all?) instructions and is fast. If you have a cdrom driver loaded (the dos622.img that is floating around on the internet has one) you can just mount (and hot swap) an iso image with your files and with mkisofs you can create an .iso image from a directory.

With that I built a small shellscript that uses yasm (nasm clone but has some additional features I needed for something unrelated) to assemble, then mkisofs to rebuild the .iso and then tells qemu to reload the .iso and then displays the listing file yasm outputs. This gives a quite comfortable workflow.

It could probably be improved by using snapshots to avoid the occasional reboot of dos (I have no idea if qemu supports them) and automating keyboard input to the vm, but this is beyond my personal effort vs. saved-effort-in-return break even point.
added on the 2012-05-28 01:32:23 by jix jix
Seruiosly, having read all of this, it's almost ridiculous to consider all of this sizecoding. If the standard procedure is to start a VM to run an intro, then the VM size should count as well. And then there are the other people complaining about d3dx dll dependecies on windows 4ks...

If all of that (d3dx, dosbox, qem) is allowed and doesn't count into the file size, then why can't we code a super mighty VM? Then I'll make you a 32b that'll make you shit bricks...

...just a thought :)
added on the 2012-05-28 10:25:18 by xTr1m xTr1m
xTr2m: By your "logic" we should count the size of the OS and emulators as well since some people don't have the original HW/SW.

DOS is just an OS. Few people run it out of box, hence DOSbox and co. Same goes most oldschool platforms. Really few of us have a C64, VCS, A500, ST, Vectrex, Oric, ZX, .... laying around.

In other news, looks like you missed IBNIZ.
added on the 2012-05-28 10:32:39 by p01 p01
xTr1m: your argument is invalid.
added on the 2012-05-28 13:45:10 by las las
Quote:
And then there are the other people complaining about d3dx dll dependecies on windows 4ks...

I've always found it easiest to just ignore people without a clue.
added on the 2012-05-28 13:56:00 by Preacher Preacher
oh noes! the filename eats bytes too! :D
Nice rotation code from baze/3SC.
Code: fsincos fld st2 fmul st0, st1 fld st4 fmul st0, st3 fsubp st1, st0 fxch st3 fmulp st2, st0 fmulp st3, st0 faddp st2, st0 Input st0=A st1=X st2=Y st3=Z Output st0=(cos(A)*X - sin(A)*Y) st1=(cos(A)*Y + sin(A)*X) st2=Z

Any way to do it smaller with fpu only? :)
added on the 2012-05-28 14:32:15 by las las
this kind of function is typically what should be in first page of this topic. just like Raymarching toolbox thread.
added on the 2012-05-28 15:19:05 by Tigrou Tigrou
Yep - I should have called this thread Tiny Intro Beginners Thread :)
added on the 2012-05-28 15:34:29 by las las
what i mean is that we need more reusable functions / tips like this (that's what make this thread interesting, among other things like IDE ). someone should make a selection and put them in first page
added on the 2012-05-28 15:34:37 by Tigrou Tigrou
Quote:
what i mean is that we need more reusable functions / tips like this (that's what make this thread interesting, among other things like IDE ). someone should make a selection and put them in first page

it would be great, but codegems enough. maybe...
Some simple ones

Absolute values of vector components - a bit swizzled
Code: fabs ; |X| Y Z fxch st2 ; Z Y |X| fabs ; |Z| Y |X| fxch st1 ; Y |Z| |X| fabs ; |Y| |Z| |X|


Input (B X Y Z)
Output (sqrt(X*X+Y*Y+Z*Z) B)
Code: ; B X Y Z fxch st3 ; Z X Y B fmul st0, st0 ; ZZ X Y B fld st2 ; Y ZZ X Y B fmulp st3, st0 ; ZZ X YY B faddp st2, st0 ; X ZZ+YY B fmul st0, st0 ; XX ZZ+YY B faddp st1, st0 ; XX+YY+ZZ B fsqrt ; L B


Maximum func
Code: _max: fcomi st0, st1 fcmovb st0, st1 fstp st1 ret


Improvements welcome.
added on the 2012-05-28 15:53:16 by las las
Quote:
xTr1m: your argument is invalid.

las: and where's yours?

I didn't mean to start a long discussion... I acknowledge that DOS is a full valid platform and is as seldomly used as older platforms like c64 and amiga. I know, it was a silly statement. It's just kind of a pitty to require all that extra software around the intro in order to run it. And if everyone follows that pattern instead of using the real thing (a bare 486 with MS-DOS 6.22 for example) it becomes some sort of a fake. That's all I wanted to say.
added on the 2012-05-28 22:14:08 by xTr1m xTr1m
Was wondering: would it be so hard to make a .COM "player" for modern OSes? Not a generic one: something able to set the stack up and intercept accesses to 0a000h, then load the code somewhere and execute it...
added on the 2012-05-28 23:25:12 by ara ara

login

Go to top