Thread: Rolling Thunder
View Single Post
Old 21 January 2020, 23:11   #20
Asman
68k

Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 718
@mcgeezer

As I know they can't, because they don't have such rights.

In 2011 I sent an email to Donald Campbell about possibility to release all Tiertex games with sources if is possible. And the answer was something like that: publishers have rights and sources.

@Retro-Nerd
As I remember it should be more like 45-47 of 50 frames. It really bad example of game written in 68000 asm.

For example lets focus on function make_sprite_adr

Code:
make_sprite_adr:
	move.w	#$6E,d7			;8c
	subq.w	#1,d7			;4c
	lea	(sprite_table).l,a0	;12c
	move.l	#$30000,d0		;12c !!! sprite_adr
.loop:	move.l	d0,(a0)			;12c
	move.w	(4,a0),d1		;12c
	mulu.w	(6,a0),d1		;52c
	lsl.l	#3,d1			;14c
	andi.l	#$FFFF8,d1		;16c
	add.l	d1,d0			;8c
	adda.l	#12,a0			;16c
	dbra	d7,.loop		;10c *109 + 14
					;total = 130 * 110 + 1104 = 15404c
	rts				;16c

	;total = 15456c
;
;	SPRITE LOOKUP TABLE
;
;	START OFFSET,WIDTH,HEIGHT,XOFFSET,YOFFSET
;	START ADDRESS ARE GENERATED BY SOFTWARE INITIALLY 
;
	EVEN
sprite_table:
	REPT 110
		dc.w	0,0,2,42,0,0
	ENDR
	
	;memory 1370 bytes
Above function can be optimized and simplified (of course after whole source analyzation)

Code:
SPRITES_AMOUNT	EQU 95
SPRITES_ADR	EQU $30000

SPRITE_WIDTH	= 32
SPRITE_HEIGHT	= 42
SPRITE_BPL	= 4

SPRITE_SIZE	= SPRITE_WIDTH/8*SPRITE_HEIGHT*SPRITE_BPL

make_sprite_adr:
		moveq	#SPRITES_AMOUNT-1,d2	;4c

		lea	sprite_table(pc),a0	;8c
		move.l	#SPRITES_ADR,d0		;12c
		moveq	#0,d1			;4c
		move.w	#SPRITE_SIZE,d1		;8c

.loop		move.l	d0,(a0)+		;12c
		add.l	d1,d0			;8c
		dbf	d2,.loop		;94*10+14
						;total 20*95+954 = 2854c
		rts				;16c
		;total 2908c

sprite_table:
		ds.l	SPRITES_AMOUNT

		;memory 408 bytes
It seems that games was coded in great hurry, because we can find for example validation of map in code instead of changing the map file.

Code:
	;validate maps
		lea	$25800,a0	;12c
.valid		cmpi.w	#$190,(a0)+	;12c
		bcs.w	.next		;10c - 12c
		move.w	#$3D,(-2,a0)	;16c * 7004
.next		cmpa.l	#$2DCD0,a0	;14c
		bcs.w	.valid		;10c, one time 12c
	;total 908086c
Above code should be removed from source.

There is only one positive thing about RT. It's great to increase your optimization skills.


@CFOU!

Some time ago (long!!!) I've started working on WHDLoad slave for RT. I wanted also fix game bugs like jerky scroll but I failed, mostly because I've made too many changes in resourced code and game sometimes just hangs. There is funny bug in game when you just start. go to the left corner and shoot in left, bullet will stay forever
I hope that you will do slave for this game with source code and perhaps in future I will find some time to tweak the game

Last edited by Asman; 21 January 2020 at 23:18.
Asman is offline  
 
Page generated in 0.04110 seconds with 11 queries