English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 04 March 2019, 18:52   #1
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,449
Celtic Heart full source code

For anybody interested, the following archive includes the complete Celtic Heart project, to build everything from scratch. It includes sources texts, graphics, music, tools, etc.:
http://server.owl.de/~frank/CelticHeart.lha

As usual for my games, the build process should be portable, so you can build it on many different host systems. Initially the only dependancy is a working ISO-C99 compiler. The rest can be built from source.

Other tools needed (build from source):
  • GNU-make
  • vasmm68k_mot
  • vlink
And the AmigaOS NDK 3.x assembler include files would be good to have. Makefile uses vbcc and Makefile.unix uses gcc to build the tools. The only variable you might have to change in your Makefile is ASINC, which defines the path to your AmigaOS assembler includes.

Have fun!
phx is offline  
Old 04 March 2019, 18:53   #2
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,390
Great PHX, will take a look at this!

Massive respect!
mcgeezer is offline  
Old 05 March 2019, 15:35   #3
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,449
Thanks.

BTW, I forgot to include any kind of license in the archive. So I want to state here that everything in it is public domain and may be freely reused in other projects.
phx is offline  
Old 05 March 2019, 15:43   #4
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 1,288
Awesome, I'll be taking a look for sure!
roondar is offline  
Old 05 March 2019, 17:55   #5
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,008
Great!
ross is offline  
Old 05 March 2019, 18:14   #6
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 688
It was mesmerizing to watch the tmx tools build process work. Nicely done.
clenched is offline  
Old 10 March 2019, 16:50   #7
ascp
Pastafarian

 
Join Date: Sep 2010
Location: Uppsala/Sweden
Posts: 290
Quote:
Originally Posted by phx View Post
For anybody interested, the following archive includes the complete Celtic Heart project, to build everything from scratch. It includes sources texts, graphics, music, tools, etc.:
http://server.owl.de/~frank/CelticHeart.lha

As usual for my games, the build process should be portable, so you can build it on many different host systems. Initially the only dependancy is a working ISO-C99 compiler. The rest can be built from source.

Other tools needed (build from source):
  • GNU-make
  • vasmm68k_mot
  • vlink
And the AmigaOS NDK 3.x assembler include files would be good to have. Makefile uses vbcc and Makefile.unix uses gcc to build the tools. The only variable you might have to change in your Makefile is ASINC, which defines the path to your AmigaOS assembler includes.

Have fun!

ascp is offline  
Old 14 March 2019, 16:54   #8
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 688
Some Amiga testing here: Latest aos3 VBCC and Target software. Instead of having to stand watch for hours, this is the way time was measured. Time stamp of bmptoraw[.exe] (first compiled) is subtracted from that of CelticHeart.adf (last) to get elapsed time close enough.

Code:
Windows (MinGW):     00h 01m 57s
WinUAE + JIT:        00h 13m 59s
Amiga 500 + A530:    13h 17m 42s
Trap Runner has over twice the levels, two more worlds of gfx (three if Pacman counts), an intro, maybe more music. I wonder how long would that take on the Amiga?
clenched is offline  
Old 15 March 2019, 19:59   #9
Zener
Registered User
Zener's Avatar
 
Join Date: Jan 2009
Location: Barcelona / Spain
Posts: 236
Just found out about this game and played it. It's great! I love the music
Zener is offline  
Old 15 March 2019, 21:14   #10
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,449
Quote:
Originally Posted by clenched View Post
Code:
Amiga 500 + A530:    13h 17m 42s
Wow! 13 hours. A530 has an 68030?
I remember that I have once built everything on my A3000 with 68060/50. It took clearly more than an hour. Usually I'm building it on my Pegasos G3 in a few minutes. Fortunately I rarely have to rebuild everything.

Quote:
Trap Runner has over twice the levels, two more worlds of gfx (three if Pacman counts), an intro, maybe more music. I wonder how long would that take on the Amiga?
A little longer. Source text will be available soon.

The time-consuming part is the lz-compression of all the files. Johan Forslöf's portable lz probably needs some optimizing...?
phx is offline  
Old 15 March 2019, 23:14   #11
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 688
Quote:
A530 has an 68030?
It is the 68EC030 to be exact. 40MHz. One thing is it has only one 4mb fast ram stick. With WinUAE increased to 8mb the time fell to 11 minutes and change.
Quote:
The time-consuming part is the lz-compression of all the files. Johan Forslöf's portable lz probably needs some optimizing...?
I looked in on the Amiga from time to time and lz was always the bottom line.

This may need looking at. Between compiling and play testing it almost slipped my mind.
Code:
vasmm68k_mot -Fvobj -quiet -x -DSDATA -I include -I :NDK_3.9/Include/include_i -o obj/sprites.o sprites.asm

fatal error 5 in line 1 of "REPEAT:sprites.asm:line 272": internal error 0 in line 1082 of expr.c
        included from line 272 of "sprites.asm"
>       move.w  (a0)+,D(a1)
aborting...
vasmm68k_mot failed returncode 20
make: *** [obj/sprites.o] Error 20
REPEAT sounds like something to do with the stack so it was increased from 4096 to 20000. After that it was OK because the ADF exactly matches yours.

Last edited by clenched; 15 March 2019 at 23:20.
clenched is offline  
Old 16 March 2019, 18:57   #12
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,449
Quote:
Originally Posted by clenched View Post
REPEAT sounds like something to do with the stack so it was increased from 4096 to 20000. After that it was OK because the ADF exactly matches yours.
Yes, 4K stack is not sufficient. For vasm and vbcc you need at least 8K, better 16K.
phx is offline  
Old 26 March 2019, 20:41   #13
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 688
Freak discovery: A timer is added to lz.c and makefile adjusted to print statistics. Rebuild on Windows and log to a file. Count all occurrences (71) of "lz -o". The sorted chart shows the distribution. See a lone file with a leap from 5 to 9 seconds. That is mntsnow_plx.bin so it will be test subject. It takes my Amiga 1h 16m to pack this one file.

Code:
sec   files   total sec
  0 * 34       0 
  1 * 11      11 
  2 * 05      10 
  3 * 11      33 
  4 * 05      20 
  5 * 04      20 
  9 * 01       9
-------------------  
      71     103
clenched is offline  
Old 27 March 2019, 13:33   #14
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,449
I noticed that lz is especially slow when packing files which have a high pack-ratio. The algorithm probably needs some optimization in that case.

Example: Packing mod-samples is fast. Packing mod-tracks is slow.
phx is offline  
Old 29 March 2019, 05:22   #15
Bruce Abbott
Registered User

Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 253
Quote:
Originally Posted by phx View Post
I noticed that lz is especially slow when packing files which have a high pack-ratio. The algorithm probably needs some optimization in that case.
That might be the understatement of the year.

I compiled your bmptoraw and lz tools with SASC 6.58. On my 50MHz 030 lz took over 1 hour to pack mntsnow_plx.bin. Packing it with lzx took less than 2 seconds, and the result was smaller. I noticed that the original 128x96 bmp image only had 4 colors, so I converted it to a 2 bitplane ILBM brush and the result was much smaller! Here are the file sizes:-

mntsnow_plx.bmp 12470
mntsnow_plx.bin 25088
mntsnow_plx.lz 3303
mntsnow_plx.lzx 2812
mntsnow_plx.ilbm 1130

According to my calculations a raw 128x96 2 bitplane image should only take up 3072 bytes, which is smaller than the lz packed file.
Bruce Abbott is offline  
Old 29 March 2019, 13:03   #16
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 688
Quote:
Originally Posted by Bruce Abbott View Post
According to my calculations a raw 128x96 2 bitplane image should only take up 3072 bytes, which is smaller than the lz packed file.
Take into account mntsnow_plx.bin is 8 times larger in area than mntsnow_plx.bmp.

tools/bmptoraw gfx/mntsnow_plx.bmp 16 96 2 SPRITE2 0-63 gfx/mntsnow_plx.bin

What is happening is 64 16*96 sprites are made from the small picture. SPRITE2 mode is in use so 4 control words must be added to each sprite.
(2bytes*96lines*2planes+8)*64 = 25088
Attached Thumbnails
Click image for larger version

Name:	mntsnow_plx.png
Views:	62
Size:	26.0 KB
ID:	62600  
clenched is offline  
Old 29 March 2019, 16:29   #17
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,449
Quote:
Originally Posted by Bruce Abbott View Post
That might be the understatement of the year.

I compiled your bmptoraw and lz tools with SASC 6.58. On my 50MHz 030 lz took over 1 hour to pack mntsnow_plx.bin.
I don't know if Johan Forslöf is reading this forum. But complaints about his lz-packer should go directly to him.

I was just happy having found a packer which is portable and much better than Bytekiller.
phx is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
[ongoing] Celtic Heart phx project.Amiga Game Factory 26 05 March 2019 12:03
Old source code? anotheramigafan Amiga scene 9 29 June 2018 16:33
Love Dungeon Full Source Code jimmy2x2x Coders. Asm / Hardware 5 17 March 2015 22:44
Source Code camelord support.Games 2 06 August 2010 17:45
Source Code Thalion project.WinUAE - Kaillera 3 28 April 2006 09:55

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.08379 seconds with 14 queries