Diablo ASM - a Collaborate effort.

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Yeah,

Code: Select all

sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
sla e
is faster than

Code: Select all

 ld b,20
Loop:
 sla e
 djnz Loop.
Of course, there is no reason to do sla 20 times, after 8 or so the number is 0 anyway.
It's called unrolling loops or something like that and it is faster, but bigger.
Image
Spencer
Extreme Poster
Posts: 346
Joined: Mon 17 Jan, 2005 8:56 am
Location: Indiana

Post by Spencer »

If you jp to quit instead of call, then you can just return from there. You don't need a status flag.
Keep in mind some of the quicker and smaller ways of testing a.

Code: Select all

or a   ;z is set if a is zero, reset otherwise.
dec a   ;z is set if a was 1.
I don't believe cp 0 should ever be used, use or a instead (it's like the xor a / ld a,0 deal, you use ld a,0 if you don't want to destroy the carry, but in this case, cp 0 destroys it anyways).
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Hehe, Spencer, I figured that one out before I started coming to the calculator forums. SSP is rampant with very odd looking structure.

But yes, ShadowPhoenix and calcul831415, good luck, cause I want to work on this, but probably can't actually start working on it for months. I will do stuff if you ask, but I have SSP and HP:HQ to think of. As well as somehting else.
Image
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

Spencer wrote:If you jp to quit instead of call, then you can just return from there. You don't need a status flag.
Keep in mind some of the quicker and smaller ways of testing a.

Code: Select all

or a   ;z is set if a is zero, reset otherwise.
dec a   ;z is set if a was 1.
I don't believe cp 0 should ever be used, use or a instead (it's like the xor a / ld a,0 deal, you use ld a,0 if you don't want to destroy the carry, but in this case, cp 0 destroys it anyways).
what if you needed to use whatever was in a before you xor it?
Image Image Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Then you shouldn't load 0 in it :P
Or back it up...
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
Shadow Phoenix
Calc Guru
Posts: 835
Joined: Mon 03 Jan, 2005 7:54 pm
Location: out there. seriosly.

Post by Shadow Phoenix »

Thanks guys for suggestions! *code updated*
Life is getting better.
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

if u want, I would like to try to help...but i'm a n00b like calcul831415 at ASM...
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

calcul831415 wrote:CruchyOS supports ION, so as long as you don't you Mirage.inc, you're okay.
Shadow Phoenix wrote:
CompWiz wrote:MirageOS? :x Try crunchyOS.I hope I don't have to list the advantages again. :)

Or, the NimbusOS beta is pretty good also.
maybe CrunchyOS is a better shell....however, I dont know...please give me a list of advantages :) .
CrunchyOS supports Mirage programs as well as Ion. It also supports compressed programs, which mirage, Nimbus, and Ion don't. Compressed programs are generally about half as big as the original, and there is no noticable delay when using them.

Crunchy also prevents most program crashes and errors from clearing the ram, and crashes will not corrupt the program, as they can in Mirage.(This has happened to me several times. One reason I switched to crunchy)

Additionally, Mirage unarchives programs when you use them, and rearchives them when you quit. This can cause your archive to wear out, as it can only endure a certain amount of writing. Crunchy, however, runs the programs directly from the archive, saving your archive fromwww getting worn out. This also prevents garbage collects. I can't remember the last time I had to garbage collect, and I've been using crunchyOS for a long time now.

Finally, you can actually build any asm file into the crunchyOS app with the included builder tool. This will allow you to use the extra space crunchy isn't using in the app, and saves your calc a lot of space.

Oh, it also lets you compress levels for any games that use levels with a level packer Crunchy comes with.

It feels like I've written this crunchyOS advantages thing 20 times now. Instead of asking me to write it again, couldn't people just look around the forum? I've posted this all over the place. :lol:

Here is a link to the ticalc.org crunchy page
In Memory of the Maxcoderz Trophy Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Yes you have compwiz :P.
Sounds cool guys about taking a crack at diablo in asm. Hope all goes well.
User avatar
Shadow Phoenix
Calc Guru
Posts: 835
Joined: Mon 03 Jan, 2005 7:54 pm
Location: out there. seriosly.

Post by Shadow Phoenix »

ok...here is my plan....
*I will prolly change the sprite of person to 8x12
*4 (8?) sprites for turning people.
*Simple map loader.

anc I cant wait for the grayscale isometric routine!

:wink:
Life is getting better.
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

I wrote a maploader that loads dynamically sized tilemaps from external programs.
Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

I think gs would be sweet, but with just 3 beginers at asm would it be easier if it was monochrome?
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

Kingma's Package anyone? I've begun looking at it and it looks almost exactly like using ionPutSprite, but everything might be twice as big and slow.

edit: 8x12 is what I'm using for my current noobish project. You really can only get good 8x8 if they're greyscale. 8x12 will be fine in monochrome.

you might just need 3 sprites for turning. I'll look for a sprite flipping routine if I can. Otherwise I'll try to write my own one. (left/right of course)
Image Image Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

calcul831415 wrote:Kingma's Package anyone? I've begun looking at it and it looks almost exactly like using ionPutSprite, but everything might be twice as big and slow.
I say:
gs.enable()
gs.drawXor(...)
gs.disable()
Piece of cake :)
edit: 8x12 is what I'm using for my current noobish project. You really can only get good 8x8 if they're greyscale. 8x12 will be fine in monochrome.
8x12 will do just as well in greyscale if you mean 8 pixels wide and 12 pixels high. Just define 12 for the height that you pass on to gs.drawXor.
you might just need 3 sprites for turning. I'll look for a sprite flipping routine if I can. Otherwise I'll try to write my own one. (left/right of course)
sprite.flip(...)
(Also good for 8x12 pixel sprites. If you need to flip greyscale ones you should just double the height (because you need to flip two buffers))
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Nah, we should use RGP, it's faster and better. And I think smaller.
Image
Post Reply