English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 15 August 2011, 06:20   #1
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Assembler to English translation needed

What value do I need to pass for a 320x200 screen using 'screenmode'?

Code:
;******************************************************************************

;void __asm indivision_initscreen(register __a0 ULONG indivisionfpgabase,
;				  register __d0 UBYTE screenmode)

_indivision_initscreen:
	movem.l a1-a2,-(sp)

	lea.l parameter_512x384(PC),a2
	cmp.b #$06,d0
	beq end_mode_select
	lea.l parameter_640x200(PC),a2
	cmp.b #$05,d0
	beq end_mode_select
	lea.l parameter_320x400(PC),a2
	cmp.b #$04,d0
	beq end_mode_select
	lea.l parameter_1024x768(PC),a2
	cmp.b #$03,d0
	beq end_mode_select
	lea.l parameter_800x600(PC),a2
	cmp.b #$02,d0
	beq end_mode_select
	lea.l parameter_640x400(PC),a2
	cmp.b #$01,d0
	beq end_mode_select
	lea.l parameter_320x200(PC),a2

end_mode_select:
	move.l a0,a1		; set up FPGA register bases
	add.l #$10,a1

	move.w #$0,(a0)		; unlock FPGA
	move.w #$fa50,(a1)

	move.w #$c0,d0		; clear video registers
clear_registers:
	move.w d0,(a0)
	move.l #$0,(a1)
	add.w #$1,d0
	cmp.w #$100,d0
	bne clear_registers

copy_display_params:
	cmp.w #$ffff,(a2)
	beq display_param_end
	move.w (a2)+,(a0)
	move.w (a2)+,(a1)
	bra copy_display_params	

display_param_end:
	move.w #$0,(a0)		; lock FPGA
	move.w #$0,(a1)

	movem.l (sp)+,a1-a2
	rts

parameter_320x200:
	dc.w $00c0,$0005,$00c1,$0000,$00c2,$0001,$00c5,$0000
	dc.w $00d1,$0190,$00d2,$01c1,$00d3,$0000,$00d4,$0030
	dc.w $00d5,$000c,$00d6,$000e,$00d7,$0048,$00d8,$013f
	dc.w $00d9,$0031,$00da,$018f,$00d0,$0005,$ffff,$ffff

parameter_640x400:
	dc.w $00c0,$0002,$00c1,$0000,$00c2,$0001,$00c5,$0000
	dc.w $00d1,$0320,$00d2,$01c1,$00d3,$0000,$00d4,$0060
	dc.w $00d5,$000c,$00d6,$000e,$00d7,$0090,$00d8,$027f
	dc.w $00d9,$0031,$00da,$018f,$00d0,$0001,$ffff,$ffff

parameter_800x600:
	dc.w $00c0,$0001,$00c1,$0000,$00c2,$0001,$00c5,$0000
	dc.w $00d1,$03ff,$00d2,$0270,$00d3,$0000,$00d4,$0048
	dc.w $00d5,$0001,$00d6,$0003,$00d7,$00c7,$00d8,$031f
	dc.w $00d9,$0017,$00da,$0257,$00d0,$0001,$ffff,$ffff

parameter_1024x768:
	dc.w $00c0,$0000,$00c1,$0000,$00c2,$0001,$00c5,$0000
	dc.w $00d1,$0530,$00d2,$0326,$00d3,$0018,$00d4,$00a0
	dc.w $00d5,$0003,$00d6,$0009,$00d7,$012e,$00d8,$03ff
	dc.w $00d9,$0025,$00da,$02ff,$00d0,$0001,$ffff,$ffff

parameter_320x400:
	dc.w $00c0,$0005,$00c1,$0000,$00c2,$0001,$00c5,$0000
	dc.w $00d1,$0190,$00d2,$01c1,$00d3,$0000,$00d4,$0030
	dc.w $00d5,$000c,$00d6,$000e,$00d7,$0048,$00d8,$013f
	dc.w $00d9,$0030,$00da,$018f,$00d0,$0001,$ffff,$ffff

parameter_640x200:
	dc.w $00c0,$0002,$00c1,$0000,$00c2,$0001,$00c5,$0000
	dc.w $00d1,$0320,$00d2,$01c1,$00d3,$0000,$00d4,$0060
	dc.w $00d5,$000c,$00d6,$000e,$00d7,$0090,$00d8,$027f
	dc.w $00d9,$0031,$00da,$018f,$00d0,$0005,$ffff,$ffff

parameter_512x384:
	dc.w $00c0,$0001,$00c1,$0000,$00c2,$0001,$00c5,$0000
	dc.w $00d1,$0298,$00d2,$0326,$00d3,$000c,$00d4,$0050
	dc.w $00d5,$0003,$00d6,$0009,$00d7,$0096,$00d8,$01ff
	dc.w $00d9,$0025,$00da,$02ff,$00d0,$0005,$ffff,$ffff

Last edited by NovaCoder; 15 August 2011 at 09:43.
NovaCoder is offline  
Old 15 August 2011, 07:27   #2
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
The source is incomplete. Unfortunately it ends exactly at the most interesting point.

When I should guess I would try it with screenmode=0.
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
Translation from Finnish to English (Turboraketti) absence project.Amiga Game Factory 55 24 May 2023 17:14
[Finished] Kajko and Kokosz english translation Shoonay project.Amiga Game Factory 259 11 April 2018 16:47
Phantasie IV (partial) English translation! MazinKaesar Retrogaming General Discussion 2 05 January 2010 09:20
english translation laser support.Other 0 02 September 2008 19:32
UBEK English translation Shoonay Amiga scene 12 15 August 2008 16:44

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 07:44.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06351 seconds with 13 queries