DSK-PRO 10.1 Killer Copy Machine Edition Released

Página 3/8
1 | 2 | | 4 | 5 | 6 | 7 | 8

Por cbsfox

Champion (392)

imagem de cbsfox

31-01-2016, 22:30

The tool is not trying to empty the copy buffer.
It just crashes, in your case, when it tries to write the file using the BIOS routines.
And I dont know why.

Por l_oliveira

Hero (534)

imagem de l_oliveira

31-01-2016, 22:39

By empty the copy buffer I meant commit data to the disk image file.

Por flyguille

Prophet (3028)

imagem de flyguille

31-01-2016, 22:43

cbsfox wrote:

The tool is not trying to empty the copy buffer.
It just crashes, in your case, when it tries to write the file using the BIOS routines.
And I dont know why.

cbsfox remember that DOS2 don't support doing FILE I/O with "CALL 5" (aka BDOS dos2) from/to RAM at "secondaries mappers".

Por cbsfox

Champion (392)

imagem de cbsfox

31-01-2016, 22:42

Yes. I just call the BIOS routine to write a file. Simple like that.

Por flyguille

Prophet (3028)

imagem de flyguille

31-01-2016, 22:46

cbsfox wrote:

Yes. I just call the BIOS routine to write a file. Simple like that.

The program must make sure it always works with primary mapper RAM and only with that RAM.

Because dos2 don't support writing to, or reading from slots with RAM handled logically as secondary RAM mappers.

So, when allocating ram segments, specifies that only get ram from the primary mapper.

Por cbsfox

Champion (392)

imagem de cbsfox

31-01-2016, 23:47

The problem is not that flyguille.
The problem is because dskpro occupies high part of the memory erasig some DOS variables. In some computers it crashes when I call the BIOS routine to write a file.

Lets try one thing l-oliveira. Before starting the process to create a PDI file, press letter "D" to disable memory expansions.
Does it crash now?

Por flyguille

Prophet (3028)

imagem de flyguille

01-02-2016, 02:23

cbsfox wrote:

The problem is not that flyguille.
The problem is because dskpro occupies high part of the memory erasig some DOS variables. In some computers it crashes when I call the BIOS routine to write a file.

Lets try one thing l-oliveira. Before starting the process to create a PDI file, press letter "D" to disable memory expansions.
Does it crash now?

It runs from the dos2 prompt?.
Does it uses only the preasigned RAM?

If so, there is legal ways to know which is the upper address it can use.

If it is doing ram segment mapping, uses the DOS2 functions always, or it will crash on ISR or BDOS calls. That is mandatory.

Por flyguille

Prophet (3028)

imagem de flyguille

01-02-2016, 02:33

here some code how to do ram segment mapping correctly.


@SetupDOS2RamHandling:	ld a, ($FB20)
			and 1
			scf
			ret z

			xor a
			ld d, 4
			ld e, 2
			call $FFCA

			ld de, @ALL_SEG
			ld bc, 48
			ldir

			and a
			ret


;....


@ALL_SEG:			RB	3			; DOS2 jump table.
@FRE_SEG:			RB	3

@RD_SEG:			RB	3
@WR_SEG:			RB	3
@CAL_SEG:			RB	3
@CALLS:				RB	3
@PUT_PH:			RB	3
@GET_PH:			RB	3

@PUT_P0:			RB	3
@GET_P0:			RB	3

@PUT_P1:			RB	3
@GET_P1:			RB	3

@PUT_P2:			RB	3
@GET_P2:			RB	3

@PUT_P3:			RB	3
@GET_P3:			RB	3			; DOS2 jump table end.




;................. this routine is for speed up, basically it saves one JP instruction, copying the jump address found in the table, to the actual program code.

@SetupDOS2SpeedUps:	ld hl, (@PUT_P2 + 1)
			ld (routineA.P2Call + 1), hl
			ld (routineB.P2Call2 + 1), hl

			ld hl, (@PUT_P1 + 1)
			ld (routineX.P1 + 1), hl
			ld (routineZ.P1 + 1), hl
			ret




;.................................................... in your program code, simply...


call @PUT_P2


; but you can't use a given ram segment if isn't allocated, so.

			xor a
			ld b, a
			call @ALL_SEG					; It request a free page from primary mapper.
			ret c

Por flyguille

Prophet (3028)

imagem de flyguille

01-02-2016, 02:38

and for knowing if the program will "fit" in the current configuration I do it.


ld hl, 0				; Check if there is enough program area.
			add hl, sp
			ld de, $80				; 128 bytes for stack.
			and a
			sbc hl, de
			ex de, hl

			ld hl, VAR_END               ; VAR_END is the last LABEL after all the variables definitions in my program that will be stored in page 3.
			and a
			sbc hl, de
			ld de, .ErrNotEnoughTPA
			jp nc, .Error

.TPAOk:			ld hl, VAR_START			; It erase the variable area.
			ld de, VAR_START+1
			ld bc, VAR_END - VAR_START - 1
			ld (hl),0
			ldir

There is more legal ways, but thrusting on the original stack pointer is good enought.

So, the program identifies that it won't fit, and prompts to the user an error message, instead leting the user to guess.

Por cbsfox

Champion (392)

imagem de cbsfox

01-02-2016, 05:29

No,no,no, I don't use DOS2 functions to get memory blocks. I do all directly.
And I don't mess with the pages the DOS2 resides.

And here, with a Turbo-R ST with Nextor and DOS2 it works perfectly.
Thats why I don't know why it does not work in that case with SCSI interface connected.

Try to run that test in a emulator and tell me if it crashes. If so, it's easy for me to identify the problem.

Regards
Marcos Daniel

Página 3/8
1 | 2 | | 4 | 5 | 6 | 7 | 8