Jump to content
IGNORED

loading binary file to...


xxl

Recommended Posts

Hi,

 

is there a way (loader) to load binary file like this:

 

 

org $2000

sei

lda #0

sta nmien

sta dmactl

lda #$fe

sta portb ;ROM OFF; BASIC OFF

rts

ini $2000

 

org $0000 ; PAGE 00

:255 .byte $ff

 

org $c000 ; UNDER ROM

:255 .byte $ff

 

org $FFFF ;

.byte $ff

Link to comment
Share on other sites

Not really.

 

It'll probably work in emulation, unsure about Altirra but Atari800Win+ injects binaries into RAM even if the overlaying ROM is switched in.

 

Best method is to use .SET 6 or whatever relocation directive for the Assembler in use. Then have the "under OS" code loaded early in the process and moved into place.

 

Page zero stuff should work, but there can be the risk that the loader itself might be using the same locations.

Link to comment
Share on other sites

This will not work on Altirra 2.0. The program loader writes several zero page locations to mimic the activity of a boot loader, so locations $09 (BOOT_) and $30 (STATUS) will be trashed after the zero page segment loads. It also reads POKMSK ($10) and so the result will be all timer IRQs being turned on when the next segment loads. AUDC1-4, IRQEN, and AUDCTL are also hit for each segment. PBCTL is written as well although the I/O and DDR registers are not currently changed. Current 2.10 test versions also require the known RTS ROM location ($E4C0). Altirra also does not allow you to load directly into RAM since the program loader uses the same mapping tables as the CPU -- the writes will get intercepted by the ROM, by hardware devices, or just go nowhere if RAM is not mapped at the target load location.

 

In short, don't do it. Relocate after all segments have loaded as Rybags suggests. There's no point in writing a program only for an emulator -- if we were doing that, the first thing I'd add is a 68000 CPU.

Link to comment
Share on other sites

  • 3 weeks later...

Site for the graphics 23 is the 3840byte an for the graphics 7 is the 3200byte

 

For the XFORTH is the, GRAPHIC 7/23 is the screen from the start DpLIST 36960.

 

Start with the XFORTH is : READFILE" D:TEST.IMG

 

36960 CONSTANT SCREEN0
3840 VARIABLE BYTEGRAPHIC

: READFILE"
 FILE" R/O OPEN-FILE
 128 < IF
   SOURCE-ID !
   SCREEN0 BYTEGRAPHIC  @ SOURCE-ID @ READ-FILE
   SOURCE-ID @ CLOSE-FILE
   0 SOURCE-ID !
 ELSE
   ." Error open file"
 THEN ;

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...