English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 22 March 2024, 17:26   #1
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Do sprites display on bootblock process?

I wrote a binary that should display a sprite, I load it from disk bootblock but sprite does not display at all.
Are there some restrictions that I'm not aware about?
fstarred is offline  
Old 22 March 2024, 17:37   #2
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,104
Have you enabled the appropriate DMA channels and set sprite colors? If you show the code or binary we can tell you exactly what's missing.
paraj is offline  
Old 22 March 2024, 17:50   #3
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,474
I bet for bitplane DMA disabled..
ross is offline  
Old 22 March 2024, 19:28   #4
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Code:
*************************************
*
*
*	BOOTBLOCK USING TRACKDEVICE
*
*
*************************************

; WARNING! WriteFlag=1 will write data to disk on df0:

; - In BootBlock, device commands CMD_CLEAR, TH_CHANGENUM and CDM_READ
; can be executed without error
; 
; - The boot code is invoked with the I/O request used to issue the device
; command in register A1, with the io_Offset pointing to the beginning of the
; partition (the origin of the boot blocks) and Sysbase in A6
;
; see also:
;
; http://amigadev.elowar.com/read/ADCD_2.1/Devices_Manual_guide/node007D.html

MAIN_ADDRESS = $70000

DoIo = -456

ProgSectors=2	; program expected size expressed in sectors

Writeflag = 1

	IF WriteFlag = 1
	AUTO	WS\BOOTBLOCK\0\ProgSectors+2\CC\
	ENDC
	
bootblock:
	dc.b	'DOS',0
	dc.l	0
	dc.l	880
	
bootEntry:

	lea	MAIN_ADDRESS,a5

	move.l	#(ProgSECTORS)*512,36(a1)	; Length
	move.l	a5,40(a1)			; ReadBuffer
	move.l	#1024,44(a1)			; Offset
	jsr	DoIo(a6)			; execute

	move.l	#0,36(a1)			; motor off
	move.w	#9,28(a1)			; command:MOTOR
	jsr	DoIo(a6)

	jmp	(a5)				; Jmp to sysoff

bootEnd:
	ds.b	1024-(bootEnd-bootBlock)	; fill remaining space 
						; of first 2 sectors with $00
mainStart:
	include	"vbarscroll.S"
mainEnd:
	ds.b	(ProgSectors*512)-(mainEnd-mainStart)	
						; fill remaining space
						; of prog sectors with $00
End

	PRINTT	"BOOTBLOCK REAL SIZE..."
	PRINTV	bootEnd
	PRINTT	"MAIN PROG REAL SIZE..."
	PRINTV	mainEnd-mainStart
Attached Files
File Type: s vbarscroll.S (7.1 KB, 36 views)
fstarred is offline  
Old 22 March 2024, 20:56   #5
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,474
Code works, but bootblock load code is broken.

(next time please upload the compiled code, too much time wasted to create an environment in which it works, not everyone uses yours)
Attached Files
File Type: zip sprite.zip (1.7 KB, 26 views)
ross is offline  
Old 22 March 2024, 21:18   #6
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Thank you so very much, next time I will upload the binary
fstarred is offline  
Old 25 March 2024, 12:06   #7
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Sorry Ross but even with you assembled I still don't get what was wrong with my bb.
What I did it's to put the main program on sector 3, read it using read command (2) on $2c(A1) and load it from address $400 on $70000.
The program was correctly loaded apparently so still I don't get where I am wrong .
fstarred is offline  
Old 25 March 2024, 12:18   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,474
Quote:
Originally Posted by fstarred View Post
Sorry Ross but even with you assembled I still don't get what was wrong with my bb.
What I did it's to put the main program on sector 3, read it using read command (2) on $2c(A1) and load it from address $400 on $70000.
The program was correctly loaded apparently so still I don't get where I am wrong .
II can take a look at it, can you upload your ADF?
ross is offline  
Old 25 March 2024, 13:16   #9
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Oh I feel silly because I often fall to same errors again and again. In this case I was using non-pc relative addresses so I was pointing to a blank address (that's why from the assembler it worked)
fstarred is offline  
Old 25 March 2024, 13:51   #10
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,474
Quote:
Originally Posted by fstarred View Post
Oh I feel silly because I often fall to same errors again and again. In this case I was using non-pc relative addresses so I was pointing to a blank address (that's why from the assembler it worked)
This is why I requested a binary

Of course the source is useful as an addition, but I would never trust an executable run exclusively within the development environment.
ross is offline  
Old 25 March 2024, 17:52   #11
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 185
this programline's are 'wrong' assembled:
MOVE.L #Sprite,d0
LEA SpritePointers,a1

spritedata are at adress: $70324, but in program on $70050 is move.l #$00026620,d0
spritepointer starts at adress: $701a6, but in program on $70056 is lea.l $00026594,a1
So wrong addresses while executing, but I don't no why?
Rock'n Roll is offline  
Old 25 March 2024, 21:03   #12
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
That's because Program is not located from an hunk, instead it is loaded as a binary data from DoIo function.
If you are not using hunk (for example a NDOS program) then you want to use PC/Ax relative addressing mode so you'll get always the correct address.
See also bootblock example on asm one
fstarred is offline  
Old 25 March 2024, 21:04   #13
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 185
Code:
change this
	MOVE.L	#Sprite,d0	
	LEA	SpritePointers,a1
to this
	LEA.L	Sprite(PC),a0
	move.l  a0,d0	
	LEA.L	SpritePointers(PC),a1
and then it works, I tested it.
Rock'n Roll 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
Resurrect a crashed process meynaf Coders. System 8 10 August 2017 12:32
Load executable as a process AmigaBoy request.UAE Wishlist 7 27 November 2009 03:42
Just started the 'whitening' process... tonyyeb support.Hardware 38 22 August 2008 23:09
Which gamemap should i process next...?? Joe Maroni HOL contributions 35 10 July 2008 05:36
need for help in backup/archive process pbareges support.Other 8 29 March 2007 15:02

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 19:26.

Top

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