Mordoric

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

Well, of course it's a bit unfair to compare the size of a function with another one that does NOT work...
Dbug wrote:As a benefit now we also have a 32 bit multiplication routine in the osdk.
Is that routine used by the random generator (so I can have it "for free" now...)?
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Nox wrote:Well, of course it's a bit unfair to compare the size of a function with another one that does NOT work...
What routine did you use (that did not work)? Just curious. I used several different ones.

One is here: http://forum.defence-force.org/viewtopic.php?t=214

In skool daze I am using this small one:

Code: Select all


randseed .word $dead  ; Will it be dead again?

randgen 
.(
   lda randseed     ; get old lsb of seed. 
   ora $308			; lsb of VIA T2L-L/T2C-L. 
   rol				; this is even, but the carry fixes this. 
   adc $304			; lsb of VIA TK-L/T1C-L.  This is taken mod 256. 
   sta randseed     ; random enough yet. 
   sbc randseed+1   ; minus the hsb of seed... 
   rol				; same comment than before.  Carry is fairly random. 
   sta randseed+1   ; we are set. 
   rts				; see you later alligator. 
.)
User avatar
coco.oric
Squad Leader
Posts: 720
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Post by coco.oric »

I've done a research about that routines 1 at 2 years ago.
Several statistical formulas have been listed in ceomag.

The code is in my repository :
http://miniserve.defence-force.org/svn/ ... t_divers.s

It's quite the same process that 4Kong but a little bit quicker.
; ----------------------------------------------------
; _GetRandomize()
; Generate a somewhat random repeating sequence. I use
; a typical linear congruential algorithm
; I(n+1) = (I(n)*a + c) mod m
; with m=65536, a=5, and c=13841 ($3611). c was chosen
; to be a prime number near (1/2 - 1/6 sqrt(3))*m.
;
; Note that in general the higher bits are "more random"
; than the lower bits, so for instance in this program
; since only small integers (0..15, 0..39, etc.) are desired,
; they should be taken from the high byte _Random+1, which
; is returned in A.
; -----------------------------------------------------
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Nox wrote:Well, of course it's a bit unfair to compare the size of a function with another one that does NOT work...
Dbug wrote:As a benefit now we also have a 32 bit multiplication routine in the osdk.
Is that routine used by the random generator (so I can have it "for free" now...)?
Yes, it's a part of the formula of the rand routine.
coco.oric wrote:t's quite the same process that 4Kong but a little bit quicker.
Anything can be faster than 4KKong, I was trying to make a small game, not a fast one :)
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

Chema wrote:What routine did you use (that did not work)? Just curious. I used several different ones.

I used the "short version" from this page
http://6502.org/source/integers/random/random.html

It's also a "a=a*b+c mod d"-type function.
I tried several start-seeds, but after 10-20 iterations it starts returning the same number again and again.
User avatar
coco.oric
Squad Leader
Posts: 720
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Post by coco.oric »

Anything can be faster than 4KKong, I was trying to make a small game, not a fast one
I didn't try to make it faster.
Simply, researching the random formulas, i found the way of determine the 3 parameters of the random routine and using 5 to multiplicate is easier to code than other better parameters.
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

mordoric.tap V0.3 21.01.2012

Image

Store 99% done, Character creation 95% done.
Spent much time on content, but not feeling very creative currently...
Noticed that sometimes it takes less bytes to just store information uncompressed, wasting a few bits here and there,
but saving all those shifts and ands to get the needed value.

Still a few things to do before I can create some monsters and put all those fine hand-crafted weapons to work...
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

What do you think of this type of font:
Image
Godzil
Squad Leader
Posts: 774
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Post by Godzil »

Dbug wrote:What do you think of this type of font:
Image
Ho! Using a script font for only the lowercase is a great idea!
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

I like the uppercase-chars, the lowercase ones I would like to try and see...
but I can't find the game, and on the available screenshots there are a few chars missing.
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

The game is Montsegur. Kind of easy to rip the font :)
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

Apparently not for me... the only download I was able to find gives me two .wav-files...
can I do anything with that...?
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

That means the game uses specific loading routines, and could not be transfered to .TAP files.
You have to load the WAV files with Euphoric's hardware tape (F1 to go to the menu screen). Once loaded you can dump the memory if needed (F9 key).
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

Thanks, I've got it.

Well... much more beautiful, a bit less readable.
I will stick with it for now... :)

Image
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

To be honest, I find the small characters rather painful to read - but that's just my opinion!
Post Reply