Jump to content
IGNORED

How to get a disk based image?


Recommended Posts

On 12/23/2022 at 11:59 AM, Thelen said:

If you're using Altirra you can mount a folder as a disk like here:

812337517_Schermafbeelding2022-12-23om20_40_03.thumb.png.58a345b14f564d25346c1d74b276e1bb.png
The following directory will be a .atr to be loaded with Altirra:

1825295060_Schermafbeelding2022-12-23om20_38_42.thumb.png.b99ec73d04170cc8c738eaa4ccbc7255.png


The autorun.sys file is the compiled code from Mads assembler (which is being put there and renamed by a .bat file). Dos will automaticly run 'autorun.sys'.

The raw files are the datafiles to be loaded later by the game.



Here is the code snippet which can be used as base, I made/adapt it to load data to the VBXE card directly from disk. Sorry, it's messy, no time to clean it...

;***********************************************************
;copy data from disk to VBXE memmory
;***********************************************************
;takes:

;a=128+..start in which bank?
;x=128+..last bank to fill
;ztmp1 = low byte pointer filename
;ztmp2 = high byte pointer filename


load_diskdata_to_VBXE_bank
               stx     tmp2    ;=last bank to fill (128+x)
               sta	TMP1	;save the starting bank



; *****************************
; First, close and open IOCB2
; *****************************
LOTRCK  LDX #$20      ;for IOCB2
        LDA #12       ;close command
        STA ICCOM,X   ; into ICCOM
        JSR CIOV      ;do the CLOSE

        LDX #$20      ;IOCB2 again



        LDA #3        ;open file
        STA ICCOM,X   ; is the command

      

        LDA ztmp1             ;low byte of start of the filename <<<<<<<<<<<<<<<<<-------------------------
        STA ICBAL,X   
        LDA ztmp2             ;high byte of start of the filename <<<<<<<<<<<<<<<<<<<---------------------------
        STA ICBAH,X


               LDA #4        ;INPUT
               STA ICAX1,X   ; open for INPUT

	lda	#0
	sta	icax2,x

        LDA #0
        STA ICBLH,X   ;high byte length
        LDA #20
        STA ICBLL,X   ;>low byte length
        JSR CIOV      ;do the OPEN






load_next_bank

        lda     tmp1
        vbsta   VBXE_MA_BSEL



; *****************************
; load 1K data 
; *****************************
        LDX #$20      ;by using IOCB2
        LDA #7        ;get character
        STA ICCOM,X   ; command

;Data is directly stored in the VBXE threw the MEMAC at $9000-9FFFF
        LDA #$00  ;start-address WHERE the data will be stored low Byte
        STA ICBAL,X   ; low byte
        LDA #$90  ;start-address WHERE the data will be stored High Byte
        STA ICBAH,X   ; high byte

;
        LDA #$00        ;length of data to read low byte<<<<<<<<<<<<<<<<<<<<<<<<<<------------------------
        STA ICBLL,X   ; low byte
        LDA #$10     ;>length of data to read high byte <<<<<<<<<<<<<<<<<<<<------------------------------
        STA ICBLH,X   ; high byte
        JSR CIOV      ;put out the line

        ldy     tmp1
        CPy     tmp2    ;Is y thesame as the last bank to load?
        beq     end_disk_bank_loading
        iny
        sty     tmp1
        jmp     load_next_bank



end_disk_bank_loading
        rts

 

Filename to point to example:

 

;Filenames of BITMAP data to load to VBXE in sub 'Initial_game_setup
;the filename of the file must be in Capitals!!!!!!!!!!!!!!!!!!!
tile_filename
        DTA	C'D1:TILES.RAW'		;tiles bmpdata level 1 NAME
    	DTA	$9B            ;atascii end of line (return) character

 

 

It took me almost a day to get proper disk loading to work, maybe this can save some time for you. Where a marked with a <<<<<<--------- you can put your own pointer and by the next the filelength you want load.

Holdon, That castlevania thing..... Are you working on a castlevania game on.... atari 8bit?

Link to comment
Share on other sites

3 hours ago, CharlieChaplin said:

 

Note: rename *.BIN to *.ATR and it will boot.

Next small step: finish the game 😁

I did that for the Beta 6.0 of course! It's available on that game's page.

 

Next small step is actually: Figure out how I'm going to handle my modern stuff AND my retro stuff, plus I'm 14 so school too. 😃

Next week is going to be a TOUGH week as it's going to be the week BEFORE ICT3 releases.

Here is ICT3:

ICT3_V23.75 (4).a78

I need to make ALL OF THE MUSIC too, as NONE exists yet. (Music for Sunset plains is in beta.)

And yes, this is in Assembly:

ICT3_V23.75 (3).a

So there you go. Have fun!

Here is the *NEW* Conner&Anthony file with the ATR and everything:

Makeatr-atari8-800 (4).atr

(That is C&a there.)

  • Like 1
Link to comment
Share on other sites

3 hours ago, Ecernosoft said:

I did that for the Beta 6.0 of course! It's available on that game's page.

 

Next small step is actually: Figure out how I'm going to handle my modern stuff AND my retro stuff, plus I'm 14 so school too. 😃

Next week is going to be a TOUGH week as it's going to be the week BEFORE ICT3 releases.

Here is ICT3:

ICT3_V23.75 (4).a78 48.13 kB · 0 downloads

I need to make ALL OF THE MUSIC too, as NONE exists yet. (Music for Sunset plains is in beta.)

And yes, this is in Assembly:

ICT3_V23.75 (3).a 199.48 kB · 0 downloads

So there you go. Have fun!

Here is the *NEW* Conner&Anthony file with the ATR and everything:

Makeatr-atari8-800 (4).atr 32.02 kB · 0 downloads

(That is C&a there.)

you can rename items before the upload so it doesn't pretend to be another tool in name.

this last .atr did not work, previous did.

Edited by _The Doctor__
Link to comment
Share on other sites

3 hours ago, _The Doctor__ said:

That now works in both PAL and NTSC under emulation, the figure runs across the screen and the the test sets remain with a rotation diagonal and brown noise in the background.

Good. Of course, colors are meant for NTSC and not PAL.

 

P.S. I am using $3C00-$3FFF for the Tilemap, which DOES mean that the header does get corrupted with ~1kb of game code/graphics.  does that mean it won't work on real hardware? Note: This happens AFTER the game has loaded, so I assume that is a NO.

 

Also, are there HARDWARE registers for touching the floppy disk? I might use ONE sector for save states. Probably not though.

Edited by Ecernosoft
Link to comment
Share on other sites

22 minutes ago, Ecernosoft said:

Good. Of course, colors are meant for NTSC and not PAL.

 

P.S. I am using $3C00-$3FFF for the Tilemap, which DOES mean that the header does get corrupted with ~1kb of game code/graphics.  does that mean it won't work on real hardware? Note: This happens AFTER the game has loaded, so I assume that is a NO.

 

Also, are there HARDWARE registers for touching the floppy disk? I might use ONE sector for save states. Probably not though.

After it's loaded, you can wipe out the load details.

 

As someone that's coded for the SIO hardware from scratch, the code to handle SIO hardware communications with the floppy disk is very complicated and not likely what you want to spend time with (1-2KB of resulting assembly). Use the built-in Atari OS routines instead. They're a bit overly verbose, but they will get the job done in ~50 bytes vs 1-2KB. Just pick a sector on the disk your data isn't using, like sector 256 in that sample disk I gave you.

  • Like 2
Link to comment
Share on other sites

3 hours ago, Zolaerla said:

After it's loaded, you can wipe out the load details.

That's what I thought.

 

3 hours ago, Zolaerla said:

As someone that's coded for the SIO hardware from scratch, the code to handle SIO hardware communications with the floppy disk is very complicated and not likely what you want to spend time with (1-2KB of resulting assembly). Use the built-in Atari OS routines instead. They're a bit overly verbose, but they will get the job done in ~50 bytes vs 1-2KB. Just pick a sector on the disk your data isn't using, like sector 256 in that sample disk I gave you.

Yeah, I didn't think it would work either. (or at least, not that well.) Thanks for proving that for me! :D

 

Link to comment
Share on other sites

10 hours ago, Ecernosoft said:

Holdon, That castlevania thing..... Are you working on a castlevania game on.... atari 8bit?

Yes, indeed. But it's for the Atari 8 bit with 'VBXE' (special graphical card) installed. (and some people complain a bit about that 😅)

See : https://forums.atariage.com/topic/336661-new-demo-castlevania/page/3/

 

  • Like 1
Link to comment
Share on other sites

On 12/25/2022 at 11:55 PM, Thelen said:

 But it's for the Atari 8 bit with 'VBXE' (special graphical card) installed. (and some people complain a bit about that 😅)

 

Welp, I shouldn't have asked, I kinda-wish it was without VBXE too. But still, that's AWESOME. I'll need to check that out sometime!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...