English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 09 July 2024, 01:39   #1
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 70
Problem with check initial offset WHDLOAD Slave

Hello. I have 2 files called sequentially and run in a whdload slave. I call with the next routine both. But the first file is not shown but is there because if I remove you can see I have a beq calling not found then if the file is not there you have the error. Then the file is found but I can’t see because it goes straight to the second file what is the problem. Why is not seen the first file? THis is what it looks the code. The first program that I don’t see is a wait mouse button “PRG” that supposed you need to click the mouse to load the next exe. But is skipped totally _program1

HTML Code:
_disk1  	dc.b    "DISK1",0  
_disk2  	dc.b    "DISK2",0 
_disk3		dc.b	"DF0",0		;for Assign
_dir2		dc.b	"DISK2",0		;for Assign  

slv_CurrentDir	dc.b	"data",0
_program	dc.b	"MAIN",0
_program1	dc.b	"PRG",0
_program2	dc.b	"INTRO",0
_args		dc.b	10
_args_end	dc.b	0
_dosbase	dc.l	0

		move.l	_resload(pc),a2		

		lea	_dosname(pc),a1		;Open doslib
		move.l	(4),a6
		jsr	_LVOOldOpenLibrary(a6)
		lea	(_dosbase,pc),a0
		move.l	d0,a6			
		
		
		lea	_disk1(pc),a0		;Assigns
		sub.l	a1,a1
		bsr	_dos_assign
		
		lea	_disk2(pc),a0		;Assigns				
		lea _dir2(pc),a1 
		bsr	_dos_assign	
		


;;;;;Exe1		


	;load exe2
		lea	_program1(pc),a0
		move.l	a0,d1
		jsr	(_LVOLoadSeg,a6)
		move.l	d0,d7			;D7 = segment
		beq	.end			;file not found

		;run exe2
		move.l	d7,a1
		add.l	a1,a1
		add.l	a1,a1
		lea	(_args,pc),a0
		move.l	(4,a7),d0		
		sub.l	#5*4,d0			;required for MANX stack check
		movem.l	d0/d7/a2/a6,-(a7)
		moveq	#_args_end-_args,d0
		
		jsr	(4,a1)
	
		movem.l	(a7)+,d1/d7/a2/a6
	
		;remove exe2
		move.l	d7,d1
		jsr	(_LVOUnLoadSeg,a6)
		
;;;;;Exe1
		
.v1start

;;;;;Exe2		
	;load exe2
		lea	_program2(pc),a0
		move.l	a0,d1
		jsr	(_LVOLoadSeg,a6)
		move.l	d0,d7			;D7 = segment
		beq	.end			;file not found

		;run exe2
		move.l	d7,a1
		add.l	a1,a1
		add.l	a1,a1
		lea	(_args,pc),a0
		move.l	(4,a7),d0		
		sub.l	#5*4,d0			;required for MANX stack check
		movem.l	d0/d7/a2/a6,-(a7)
		moveq	#_args_end-_args,d0
		
		jsr	(4,a1)
	
		movem.l	(a7)+,d1/d7/a2/a6
	
		;remove exe2
		move.l	d7,d1
		jsr	(_LVOUnLoadSeg,a6)
;;;;;Exe2	

Last edited by field3d; 09 July 2024 at 06:26.
field3d is offline  
Old 09 July 2024, 20:13   #2
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,261
What exactly is failing? Is it the loadseg? Are both programs on the same disk? If the original game uses startup-sequence you might be better off using that rather than "emulating" it yourself, i.e. letting the system boot normally and hook in with e.g. CBDOSLOADSEG rather than BOOTDOS.
paraj is offline  
Old 10 July 2024, 02:08   #3
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 70
Quote:
Originally Posted by paraj View Post
What exactly is failing? Is it the loadseg? Are both programs on the same disk? If the original game uses startup-sequence you might be better off using that rather than "emulating" it yourself, i.e. letting the system boot normally and hook in with e.g. CBDOSLOADSEG rather than BOOTDOS.
@paraj I found the issue by any reason the file required some files inside libs and c to run. Due purposes of the whdload I was removed that dies but the program takes data from there. Very rare case. Thank you
field3d 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
XP8 (ECS) WHDLoad security check problem Condor-2-4-2 support.Games 11 17 July 2022 01:06
Problem creating my first Whdload install: empty slave emuola project.WHDLoad 40 30 December 2021 00:10
TFX whdload-slave? Swe_Kryten2x4b support.Games 8 25 July 2021 17:09
WHDLoad - NTSC and screen offset Anubis project.WHDLoad 4 27 January 2010 21:20
Avoid ROM check on initial use Amichem support.WinUAE 4 04 October 2007 15:58

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 12:45.

Top

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