Author Topic: checkers  (Read 9878 times)

0 Members and 1 Guest are viewing this topic.

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
checkers
« on: April 12, 2007 »
this is an experiment I got plenty of bytes left for a 64b but I still cant make it colourful cos all my registers are tied up if anyone can improve on this please post here an explaination of the workaround

edit -
Don't run this at work or school the beeps and squeks the speaker makes will attract the attention of people nearby (sorry Thygrion)

edit -
Fixed the colours even managed to syncronize the tune to the display :D
« Last Edit: April 14, 2007 by rain_storm »

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: checkers
« Reply #1 on: April 12, 2007 »
Wahey! Nice use of the internal speaker to make a beepy soundtrack :D

Have some Karma.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: checkers
« Reply #2 on: April 12, 2007 »
yeah that tune is the reason why colours cant be used my registers are tied into two processes one that wants them between 10h and 17h and the other one wants them between 0 and 255 problem is the colours between 10h and 17h are way too dark thanks for the K

Challenge Trophies Won:

Offline ferris

  • Pentium
  • *****
  • Posts: 841
  • Karma: 84
    • View Profile
    • Youth Uprising Home
Re: checkers
« Reply #3 on: April 12, 2007 »
That damn beeper got me in trouble with my teacher :P

VERY cool to do that in 64b though :)

Awhile back I did a rotozooming checkerboard in 128 bytes..wish I had it here.
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: checkers
« Reply #4 on: April 12, 2007 »
That's a good one - I like it. Have some Karma for sharing the code !!!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: checkers
« Reply #5 on: April 12, 2007 »
Use di and bp to take off some of the register pressure.  If that means that you need to do some calcs as words instead of bytes, so be it.

Also

10-17h  and 0-ffh
if ax is 0-ff
then
shr ax,5
or  ax,10h
means ax is 10-17h

Don't know if that's useful.

By the way, Vista has removed full screen DOS mode support, so none of these demos work (or can be made to work) any more :(

Jim
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: checkers
« Reply #6 on: April 13, 2007 »
maybe I should try my hand with win32 opengl or directx actually whats your opinion of assembler Jim is it unnecessary in todays world. are benefits in hand optimising enough to go through the steep learning curve

Challenge Trophies Won:

Offline p01

  • Atari ST
  • ***
  • Posts: 158
  • Karma: 51
    • View Profile
    • www.p01.org
Re: checkers
« Reply #7 on: April 13, 2007 »
rain_storm: I like this one better.
The necessity of assembly depends on what you want to develop:

- If you want to make ridiculously small intro, as we do in the demo scene with the sub 1k prods, assembly is the way to go ( although there is ONE 256b intro in C ).

- if it is games for a handheld console, you might write a bit of assembly for a few critical parts.

- For basically anything else it's not really worth it speed-wise and size-wise unless you know exactly how to arrange your code and data in an efficient way that a compiler have no clue about.


But of course it's nice knowing some assembly.


Jim: Do they work in DosBOX ?

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: checkers
« Reply #8 on: April 13, 2007 »
@rain_storm:

Personally, my assembler knowledge back on the amiga gave me a first
impression of how the computer actually works or "thinks" - because
I coded the chips directly ...

Nevertheless, in general if you don't code on small devices like p01 says or
some geek-related scene stuff - assembly is not a good choice IMHO. But
from the industry point of view I wouldnt even code a lot with C anymore.

Scene-related you might use assembly with WinApi and OpenGl/DirectX to
produce releases ( e.g. 4kb intros ) that run on Vista as well - as long as
you want to stick to assembly language ...
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Paul

  • Pentium
  • *****
  • Posts: 1490
  • Karma: 47
    • View Profile
Re: checkers
« Reply #9 on: April 13, 2007 »
WOW, that made me smile :)
I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

Offline p01

  • Atari ST
  • ***
  • Posts: 158
  • Karma: 51
    • View Profile
    • www.p01.org
Re: checkers
« Reply #10 on: April 13, 2007 »
benny!: Only a handfull of PC 4Kb are made in Assembly ( mainly those by NullOok who created their own Assembly language/compiler/snafu ). All the other use C/C++ also pixel shaders makes coder's life easier. You should check the seminar Gargaj/Conspiracy gave ( IIRC ) at Demozone 2005.

Of course on Amiga, it's assembly all the way. Blueberry(sp?)/Loonies gave a talk at Assembly 2005 ( I think ) where he gave some nice hints and explained that he created some sort of virtual machine with shorter opcodes.


Check on scene.org, demoscene.tv or the site of the respective demo parties to get the videos of these seminars.

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: checkers
« Reply #11 on: April 13, 2007 »
@p01:

I know, I know. I am coding some < 4kb productions atm in C, too. But I just
thought assembly would fit more for tiny productions as to manage bigger
projects with it. That was my intention while mentioning 4kb productions.
If you have a good self-discipline you can of course realize everything in pure
assembly - but that's rather uncommon these days.

And of course you can optimize some parts of your C code with inline ASM if
you want...
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: checkers
« Reply #12 on: April 13, 2007 »
- For basically anything else it's not really worth it speed-wise and size-wise unless you know exactly how to arrange your code and data in an efficient way that a compiler have no clue about.
I have to admit that I am nowhere near the level that this applies to so whats you language of choice p01? also which language is the most commonly used in the scene for the 64k's. Is it largely C or are there alternatives

And of course you can optimize some parts of your C code with inline ASM if
you want...
Thats something I can live with. also I have picked up a notion of how the PC sees the data thats put in front and I suppose that has too go someway towards developing some real coding skills but back in the days of the amiga every last drop of performance was hard won thats simply not the case anymore

Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: checkers
« Reply #13 on: April 13, 2007 »
also which language is the most commonly used in the scene for the 64k's. Is it largely
C or are there alternatives
...

The most common language is C/C++. And from the sources I see - the majority tend to
use the Visual Studio and M$ compilers. So, I would definately go with this product - if
you want to code for Windows in C/C++.

When size doesn't matter and you want to create bigger (demo-)systems you can get in
touch with the object-orientation of C++ and seperating some fx / particles / 3D-modells
in objects.

Learning C++ and the principle of object orientation may helps you in understanding other
technologies, frameworks and the basic of nowadays software architecture. So, it might
be helpful when you program stuff that arent scene related. But this is actually up to you.

Alternatives for creating intros are existing. Have a look at the variety of languages this
forum supports. Have a look at Delphi, Java, Cobra or the various Basic dialects. Neverthe-
less, I would advice to have a go with C/C++.

Just my 2cts.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: checkers
« Reply #14 on: April 14, 2007 »
->rain_storm.   Assembler still has its place.  I've written not very much of it over the last 6 years, but it was still needed every now and then.  Before that, I wrote loads and loads.

Jim
Challenge Trophies Won:

Offline Agent Smith

  • ZX 81
  • *
  • Posts: 24
  • Karma: 3
    • View Profile
Re: checkers
« Reply #15 on: April 14, 2007 »
rain_storm: If you want to reallly get into assembly, check out Menuet OS

The entire OS and all apps are written in 100% assembly (with source code included for some).
There are also ports of Doom and Quake.

You don't need to install it on your HDD as the whole OS boots off a single floppy.

Offline p01

  • Atari ST
  • ***
  • Posts: 158
  • Karma: 51
    • View Profile
    • www.p01.org
Re: checkers
« Reply #16 on: April 14, 2007 »
rain_storm: The most common language, by large, for 64k intros is C++.  People use Visual Studio then pack their prods with kkrunchy, andpakk2, UPX, ...

I'm not "mainstream". Since I started working in the IT I didn't wrote much C++.

On PC I do small intros ( ~64b in assembly 80x86 and ~256b in JavaScript ) and JavaScript demo(s). It's fun to try and do things supposedly reserved to Flash.

On Atari I make pictures and some small intros, mainly bootsectors, in assembly 68000 ( I usually make the prototype of the effect in JavaScript )

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: checkers
« Reply #17 on: April 14, 2007 »
Thanks for all the feedback guys I will be downloading visual studio today and will start looking into C++. I dont think I will be dropping assembler just like that. I wanna try DirectX or OpenGL in win32 but I think its time for me to spread my wings so to speak. Agent Smith I heard about Manuet OS but I never knew that it booted from a floppy thats great :D thanks for the info guys

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: checkers
« Reply #18 on: April 14, 2007 »
I fixed the colour and attached the com file in the original post.
the colours and the tune are synced to each other so I'm happy with the results

Challenge Trophies Won: