Jump to content



0

loading binary file to...


5 replies to this topic

#1 xxl OFFLINE  

xxl

    Moonsweeper

  • 465 posts
  • Location:KRAKOW/Poland

Posted Tue Jan 3, 2012 2:56 AM

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

#2 Heaven/TQA ONLINE  

Heaven/TQA

    Quadrunner

  • 8,109 posts
  • Location:Baden-Württemberg, Germany

Posted Tue Jan 3, 2012 3:27 AM

depends on your EXE loader? it could work if you copy OS ROM to RAM and then switch off?

otherwise you would need to write your own... so when loading 128/256 bytes then you move them manually under ROM.

#3 Rybags OFFLINE  

Rybags

    Quadrunner

  • 10,314 posts
  • Location:Australia

Posted Tue Jan 3, 2012 4:29 AM

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.

#4 phaeron OFFLINE  

phaeron

    Dragonstomper

  • 629 posts
  • Location:USA

Posted Tue Jan 3, 2012 10:29 PM

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.

#5 xxl OFFLINE  

xxl

    Moonsweeper

  • 465 posts
  • Location:KRAKOW/Poland

Posted Sat Jan 21, 2012 4:22 AM

> the first thing I'd add is a 68000 CPU

maybe you should as part of vbxe core :-)

#6 funkheld OFFLINE  

funkheld

    Space Invader

  • 26 posts

Posted Fri Jan 27, 2012 3:26 AM

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 ;





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users