![]() |
![]() |
#1 |
Registered User
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? |
![]() |
![]() |
#2 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,301
|
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.
|
![]() |
![]() |
#3 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,534
|
I bet for bitplane DMA disabled..
|
![]() |
![]() |
#4 |
Registered User
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 |
![]() |
![]() |
#5 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,534
|
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) |
![]() |
![]() |
#6 |
Registered User
Join Date: Mar 2018
Location: Rome
Posts: 173
|
Thank you so very much, next time I will upload the binary
|
![]() |
![]() |
#7 |
Registered User
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 . |
![]() |
![]() |
#8 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,534
|
Quote:
|
|
![]() |
![]() |
#9 |
Registered User
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)
|
![]() |
![]() |
#10 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,534
|
Quote:
![]() Of course the source is useful as an addition, but I would never trust an executable run exclusively within the development environment. |
|
![]() |
![]() |
#11 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 50
Posts: 214
|
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? |
![]() |
![]() |
#12 |
Registered User
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 |
![]() |
![]() |
#13 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 50
Posts: 214
|
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. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
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 |
|
|