Jump to content
IGNORED

Wordmark ROMDOS Manual


Curt Vendel

Recommended Posts

On 10/17/2022 at 9:47 PM, ivop said:
atari800 -nopatch -nopatchall -ntsc -xl -xlxe_rom sixteenkay.rom -xl-rev custom -cart basicrevc.bin -cart-type 1 blank.atr

Screenshots:

 

atari001.png.dca6934143404ac1f6ec537714f488aa.png

atari002.png.37035c7e3657dc5ff4defd178d1ecea2.png

 

Edit: and PAL works, too:

 

atari000.png.c4c2f06f5926be921e388790890542e8.png

 

In theory, this should work on real hardware.

Edited by ivop
Link to comment
Share on other sites

OK, some testing completed.  Your "Blank" version works best -- on real hardware.  I don't have an original disk.  I have the Rdos that was posted some years ago.  It is the same as your 0.1 version atr.  When I boot your Blank, it does the boot sectors and immediately goes to READY.  If I don't have a Basic cart inserted, it loads DUPR.  In light testing, everything works correctly using Blank.  I copied files, formatted ATR's, locked and unlocked files, loaded files.  I think this is a keeper!  Here is the OSS version.  Takes a little longer to load, since it has to actually load the DOS.SYS code.  But gives you a few more bytes of ram. 

 

I have no idea what the 1-sector Autorun.sys file does.  Perhaps you can determine its purpose.

 

I have added the same ATR minus the AUTORUN.SYS, since I believe that it has nothing to do with the dos files.

 

 

 

 

 

Romdos for Suprcarts.atr

RomdosforSuprcarts minus AUTORUN.SYS.atr

  • Thanks 2
Link to comment
Share on other sites

14 minutes ago, Larry said:

If I don't have a Basic cart inserted, it loads DUPR.

Yes, this was expected as it doesn't recognize internal BASIC.

 

15 minutes ago, Larry said:

In light testing, everything works correctly using Blank.  I copied files, formatted ATR's, locked and unlocked files, loaded files.

Good to hear! Have you tried writing DOS files to a newly formatted ATR and then boot it again?

 

And to be sure, were you able to boot romdos.atr in the end, or only the blank.atr image?

 

Thanks for the supercarts.atr. I'll look into it later.

Link to comment
Share on other sites

Thank you all so much, especially Larry for the Supercart version.

 

Just a short question, does someone has the Omnimon! rom with help, the very 1st version?

 

Omnimon!, by CDY Consulting (David Young), 1982
- Resident machine language monitor
- Direct successor to Supermon! by David Young
- Installs into the 4KiB byte block of memory at $C000.
- Standard Version (4KiB): Has a HELP command (not present in other versions)
   - Shipped with piggyback board by The Peripheral Connection (Bill Williams)
   - Shipped with Newell Industries Ramrod personality board (800)
  • Like 1
Link to comment
Share on other sites

OK, back to testing...  RDos (0.1) needs only one file on the disk/ATR: DUPR.SYS.  It evidently depends on all of DOS.SYS being in the the rom.  As far as I can tell, it does everything correctly, including writing the one file when using the H command.  And the resulting disk is bootable just as the original.  It provides an FRE(0) of 35106.

 

RDos for OSS (0.0) works fine also, but it has the two normally expected files -- DOS.SYS and DUP.SYS.  There is one new wrinkle -- the original ATR that I was using has a couple of BBS files on it and an AUTORUN.SYS file of one sector.  When I delete those files, then FRE(0) = 37532 instead of 36373.  So presumably, that AUTORUN altered available memory, probably raising MEMLO.  Some slightly bad news, the RDos for OSS cannot be used with regular Atari Basic.  Not much of an issue, but it must be used with a Supercartridge.

 

 

  • Like 1
Link to comment
Share on other sites

22 minutes ago, Larry said:

OK, back to testing...  RDos (0.1) needs only one file on the disk/ATR: DUPR.SYS.  It evidently depends on all of DOS.SYS being in the the rom.  As far as I can tell, it does everything correctly, including writing the one file when using the H command.  And the resulting disk is bootable just as the original.  It provides an FRE(0) of 35106.

That's good to hear! But you mean 36106, right?

 

Did you do this all starting with the 'blank.atr' image, or can you now also boot romdos.atr and create a blank disk and initialize it with the H command? (which should give you blank.atr without HELLO.BAS ;) )

 

22 minutes ago, Larry said:

RDos for OSS (0.0) works fine also, but it has the two normally expected files -- DOS.SYS and DUP.SYS.  There is one new wrinkle -- the original ATR that I was using has a couple of BBS files on it and an AUTORUN.SYS file of one sector.  When I delete those files, then FRE(0) = 37532 instead of 36373.  So presumably, that AUTORUN altered available memory, probably raising MEMLO. 

Interesting. You're probably right that the AUTORUN.SYS has nothing to do with the RDOS capability and does something for the BBS stuff.

 

22 minutes ago, Larry said:

Some slightly bad news, the RDos for OSS cannot be used with regular Atari Basic.  Not much of an issue, but it must be used with a Supercartridge.

That was to be expected I guess. Enabling and disabling the ROM to reach the RAM underneath is different.

 

Thanks for running your tests!

Link to comment
Share on other sites

And a other question about this 4kB slot on RAMROD cards. Does it always need a boot disk? I assume if you put an OmniView 4kB ROM in there, it would need a boot disk to register the handler to the OS, right? On the same subject, is that OmniView 4kB ROM available anywhere? I can only find ROM images that are prepended to OSB which then itself is patched.

Edited by ivop
Link to comment
Share on other sites

1 hour ago, ivop said:

Third time I ask this question ;) Can you now also boot romdos.atr on real hardware, or only the blank.atr and the generated new disks with that?

 

Yes, you can boot it with your "Ramrod XLOS" and the atr boots normally.  If you write the dos files, it just writes the DUPR.SYS file.  So presumably it checks to see if the dos code is in rom.  But that atr does not work correctly with an XLOS.  It boots, but when you go to to the DUP menu, it puts some garbage on the screen and that garbage increases. Or, if you let the autorun.sys file load, the dup menu does not appear.  Since I don't have an original disk I can't be sure what is really supposed to be on that disk.  For instance, I don't know what the 15 sector Autorun.sys file does.  But using your Ramrod XLOS, and DUPR.SYS, everything appears to work normally. 

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, ivop said:

And a other question about this 4kB slot on RAMROD cards. Does it always need a boot disk? I assume if you put an OmniView 4kB ROM in there, it would need a boot disk to register the handler to the OS, right? On the same subject, is that OmniView 4kB ROM available anywhere? I can only find ROM images that are prepended to OSB which then itself is patched.

Omniview is switched between 40/80 modes with certain keystroke combinations.  No boot disk required. It's best to read the Omniview manual for details because hit has other features besides 80 columns.

https://archive.org/details/Atari_OMNIVIEW_manual/mode/2up

Link to comment
Share on other sites

3 hours ago, tep392 said:

Omniview is switched between 40/80 modes with certain keystroke combinations.  No boot disk required. It's best to read the Omniview manual for details because hit has other features besides 80 columns.

https://archive.org/details/Atari_OMNIVIEW_manual/mode/2up

That's OmniView XL/XE with a patched OS ROM.

 

I was asking about the 4kB OmniView ROM that could be plugged into the personality board and appear at $C000, not related to the OS at all, similar to how ROMDOS/RDOS works. If the OS is not patched, special key combinations will not work.

Link to comment
Share on other sites

6 minutes ago, ivop said:

That's OmniView XL/XE with a patched OS ROM.

 

I was asking about the 4kB OmniView ROM that could be plugged into the personality board and appear at $C000, not related to the OS at all, similar to how ROMDOS/RDOS works. If the OS is not patched, special key combinations will not work.

RTM

Link to comment
Share on other sites

1 hour ago, tep392 said:

RTM

I was specifically asking about the oldest 4kB OmniView that was mentioned in the FAQ. To rephrase my question, are such 4kB ROMs known to exist and are any dumps available? That's a 4kB ROM that should work alongside a NON-PATCHED OS A or B. Like the 4kB ROMDOS ROM we are using in this thread.

 

A boot disk should not really be available if you run OmniView aware applications. They can init themselves. RTM. Turning on 80 columns by software.

 

So basically this only works if you run OmniView aware software? And where do I find OmniWriter and such? :)

 

Edited by ivop
Link to comment
Share on other sites

Edit: From the manual

Turning on 80 columns:
if you are not using one of the programs that activates 60 columns automatically, you can do so from the keyboard by holding down the START and SELECT switches and then very briefly pressing the OPTION switch. Then press the BREAK key to clear out the line buffer, it is important that you hold down the OPTION switch as briefly as possible (more of a tap actually). This is because these three switches are monitored during the vertical blank Interrupt (VBI). If the VBI detects the closure of all three switchs, it doe^ a JSR $C001 to initialize OtINlVIEW. Holding the switches down longer than one VBI causes the VBI to be reentered, pushing more stuff on the stack and eventually causing the stack to overflow. A great way to lock up your computer! Other ways to turn on 80 columns are •X=USR(49152)' from BASIC or 'JSR $C00r from assembly language.

Link to comment
Share on other sites

15 minutes ago, tep392 said:

I don't know how the 4k ROM's work with out an OS patch, but they do.  Omnimon 4k doesn't require a patched OS.

I only know SuperMon and OmniMon as 16kB ROMS, which were patched OS.B ROMS with 4kB of code prepended and a gap of zeroes and then plugged into an XL. Or 64kB EPROMs with 4 OSes and a switch.

 

So they were also 4kB ROMs that worked alongside a non-patched 400/800 OS on this personality board? I can hardly believe it. How can it intercept cold start SELECT to go to the monitor if there's no such thing in the OS code and the code in $C000-$CFFFF has never been run yet?

Edited by ivop
Link to comment
Share on other sites

49 minutes ago, ivop said:

I only know SuperMon and OmniMon as 16kB ROMS, which were patched OS.B ROMS with 4kB of code prepended and a gap of zeroes and then plugged into an XL. Or 64kB EPROMs with 4 OSes and a switch.

 

So they were also 4kB ROMs that worked alongside a non-patched 400/800 OS on this personality board? I can hardly believe it. How can it intercept cold start SELECT to go to the monitor if there's no such thing in the OS code and the code in $C000-$CFFFF has never been run yet?

I haven't looked into why it works, but somehow the Newell daughter card is able to intercept the interrupt when select/reset or option/reset is pressed.  The daughter card plugs into the C014599B OS socket and re-uses the Atari ROM.  There is no other ROM except the 4k Omnimon or Omniview chip.

 

Edit:  The only thing I can think is that the board intercepts the interrupt by switching in the Omnimon/view rom when the interrupt vector is read.

Edit2: I just popped into omnimon from the Memopad and checked the vectors at 200-217.  The VBREAK vector at 206,207 is $C0C4.  It had to be set by some address decoding trickery during the OS boot process.

  • Thanks 1
Link to comment
Share on other sites

48 minutes ago, tep392 said:

Edit: From the manual

Turning on 80 columns:
if you are not using one of the programs that activates 60 columns automatically, you can do so from the keyboard by holding down the START and SELECT switches and then very briefly pressing the OPTION switch. Then press the BREAK key to clear out the line buffer, it is important that you hold down the OPTION switch as briefly as possible (more of a tap actually). This is because these three switches are monitored during the vertical blank Interrupt (VBI). If the VBI detects the closure of all three switchs, it doe^ a JSR $C001 to initialize OtINlVIEW. Holding the switches down longer than one VBI causes the VBI to be reentered, pushing more stuff on the stack and eventually causing the stack to overflow. A great way to lock up your computer! Other ways to turn on 80 columns are •X=USR(49152)' from BASIC or 'JSR $C00r from assembly language.

Yes, that's the software way I mentioned to enable OmniView what I R'd in TM. That's what OmniView aware applications call :)

 

OmniView is pretty clear now I guess, but SuperMon and OmniMon as a single 4kB alongside an unpatched ROM is not ;) The 400/800 generates an NMI (unlike the XL/XE) when you press RESET, but somehow the Newell card has to present different ROM code for the NMI handler than the OS provides.

 

Interesting stuff. Never owned an 800 as they were rare over here.

Link to comment
Share on other sites

1 minute ago, ivop said:

Yes, that's the software way I mentioned to enable OmniView what I R'd in TM. That's what OmniView aware applications call :)

 

OmniView is pretty clear now I guess, but SuperMon and OmniMon as a single 4kB alongside an unpatched ROM is not ;) The 400/800 generates an NMI (unlike the XL/XE) when you press RESET, but somehow the Newell card has to present different ROM code for the NMI handler than the OS provides.

 

Interesting stuff. Never owned an 800 as they were rare over here.

I've confirmed that it alters the VBREAK vector.  This is why BRK instructions will jump into omnimon. I'm pretty sure the board has to be enabling the 4K rom when the OS is copying the vectors from ROM to $0200.  I should be able to verify by comparing the vector table in the OS ROM to the Omnimon ROM.

Link to comment
Share on other sites

I see. So that's different compared to the ROMDOS ROM which is completely separate and needs a boot disk. Well, version 0.1 at least :)

 

Thanks for testing!

 

Back on topic:

 

I have an 80% complete annotated disassembly of the boot code (384 bytes), but my arms and shoulders are tired, so I guess that has to wait until tomorrow. Interesting stuff in there though. Supercart stuff even! Hadn't expected that on the romdos.atr/blank.atr. Teaser for tomorrow! ;)

Edited by ivop
Link to comment
Share on other sites

3 minutes ago, ivop said:

I see. So that's different compared to the ROMDOS ROM which is completely separate. Well, version 0.1 was :)

 

Thanks for testing!

 

Back on topic:

 

I have an 80% complete annotated disassembly of the boot code (384 bytes), but my arms and shoulders are tired, so I guess that has to wait until tomorrow. Interesting stuff in there though. Supercart stuff even! Hadn't expected that on the romdos.atr/blank.atr. Teaser for tomorrow! ;)

They could have made ROMDOS auto initiate at startup, so they must have made the conscious decision not to. As a user, I would rather have the option of what DOS I boot up with, so I think that makes sense.

Link to comment
Share on other sites

Okay, here it is. Reverse engineered annotated source code of the RDOS V0.1 boot code.

 

Spoiler

; ----------------------------------------------------------------------------

; Dissassembly of RDOS/ROMDOS boot code (first three sectors)
; October 2022 by Ivo van Poorten
; Tools used: atari800, frida, dis6502, vim and mads

; ----------------------------------------------------------------------------

    opt h-          ; no XEX header

    org $0700

; ----------------------------------------------------------------------------

DIRSECTOR   = $0169         ; 361

; ----------------------------------------------------------------------------

; OS Equates

DOSINI  = $0C
ICAX5Z  = $2E

FMZSPG  = $43

ZBUFP   = FMZSPG
ZDRVA   = FMZSPG + 2

DDEVIC  = $0300
DCOMND  = $0302
DSTATS  = $0303
DBUFLO  = $0304
DBUFHI  = $0305
DTIMLO  = $0306
DBYTLO  = $0308
DBYTHI  = $0309
DAUX1   = $030A
DAUX2   = $030B
SIOV    = $E459

; ----------------------------------------------------------------------------

; Other Equates

CARTLEFT    = $A000
ROMDOSROM   = $C000
CARTIO      = $D500

; ----------------------------------------------------------------------------

; BOOT SECTOR starts here

BFLAG
boot_flag
    dta $00         ; unused

BRCNT
boot_record_count
    dta $03         ; 3 boot sectors

BLDADR
boot_loader_address
    dta a($0700)    ; where the bootcode is loaded

BIWTARR
boot_initialization_address
    dta a(ROMDOSROM + $0CB0)        ; somewhere in ROM :)

XBCONT
boot_jmp_boot_continuation_vector
    jmp boot_continuation

; variables for RDOS/MyDOS

    dta $03,$DF,$01,$04,$0B

density
   dta $01      ; $01 = SD, $02 = DD

buffer_index
    dta $FD      ; $fd for DD disks, $7d for SD disks

; drives info
    dta $01,$01,$00,$00,$00,$00,$00,$00
    dta $52,$52,$D2,$D2,$D2,$D2,$D2,$D2

;    dta $4C,$06,$08
    jmp do_sio_without_setting_daux         ; coincidence?

    dta $00,$00,$00,$00

command_mirror
    dta 'W'                 ; write

filename
    dta 'DOS     SYS'

; ----------------------------------------------------------------------------

boot_continuation
    ldx #$21

compare_ram_to_part_of_rom
    lda ROMDOSROM+$10,X
    cmp advance_zbufp_and_dbuf-1,X
    bne ram_is_not_equal

    dex
    bne compare_ram_to_part_of_rom

; ROMDOS ROM is present

    lda #$B0
    ldy #$CC
    jmp store_dosini_and_return

; --------------------------------

; No ROMDOS present

ram_is_not_equal

    jsr some_supercart_stuff    ; check if supercart banking works

    cpy #$08
    bcs going_to_skip_modify

    tya

    jsr some_supercart_stuff

    cpy #$08
    beq modify_code             ; only if Y is 8, whatever that means ;)

going_to_skip_modify
    lda #>BUFFER                ; (a,y) = $0874     low mem buffer
    ldy #<BUFFER

    ldx #' '                    ; normal DOS.SYS
    bne skip_modify             ; branch always

modify_code
    sta store_a_to_cartio+1     ; LSB of store to CARTIO + what is stored here

    lda #>(CARTLEFT + $0400)    ; (a,y) = $a400     buffer under supercart
    ldy #<(CARTLEFT + $0400)

    ldx #'C'        ; load DOSC.SYS version to be hidden underneath the cart

skip_modify
    stx filename+3

    jsr set_zbufp_and_dbuf              ; set both pointers

    ldy #<DIRSECTOR
    bne load_sector           ; branch always

; --------------------------------

next_dir_entry
    tya
    sbc #$10            ; subtract one directory line (16 bytes)
    ora #$0f            ; always start comparing from the end of the dirline
    tay
    bpl continue_comparing      ; not went "under zero" so continue

    ldy ZDRVA           ; remembered LSB of sector
    iny                 ; next one
    cpy #<DIRSECTOR+8
    bcs error_out       ; stop at 369, 368 was last directory sector

; --------------------------------

load_sector
    sty ZDRVA           ; remember LSB of sector
    clc
    ldx density
    lda #>DIRSECTOR

    jsr do_sio_with_daux_ay

    bmi error_out

; --------------------------------

; start comparing from last entry backwards through the directory

    ldy #$7f            ; end of buffer

continue_comparing
    ldx #$0b            ; 11 bytes (compare is done with bne keep_comparing)

; compare filename

keep_comparing
    lda (ZBUFP),Y
    cmp filename-1,X
    bne next_dir_entry

    dey
    dex
    bne keep_comparing

; found!

    lda (ZBUFP),Y
    tax                     ; save MSB of first sector

    dey
    lda (ZBUFP),Y
    sta FMZSPG+5            ; save LSB of first sector

    dey
    dey
    dey
    lda (ZBUFP),Y           ; flags
    and #$81                ; DELETED | CREATED_BY_DOS2
    bne next_dir_entry      ; if one of them is true

    txa                     ; MSB of first sector in A

    ldy FMZSPG+5            ; LSB of first sector in Y

read_next_sector
    clc
    ldx density
    beq error_out

    jsr do_sio_with_daux_ay

    bmi error_out

; process sector link for next sector or end

    ldy buffer_index
    lda (ZBUFP),Y
    and #$03                ; upper two bits of next sector
    pha                     ; save MSB

    iny
    ora (ZBUFP),Y           ; logical OR with lower eight bits
    beq we_are_done         ; if all zero, we are done

    lda (ZBUFP),Y           ; otherwise, load lower eigth bits
    pha                     ; save LSB

    jsr advance_zbufp_and_dbuf       ; where we load stuff

    pla                     ; restore LSB in Y
    tay

    pla                     ; restore MSB in A
    bcc read_next_sector

error_out
    sec
    rts

; -----------

we_are_done
    pla                         ; one stray byte on the stack

    lda #<($17B0)               ; DOSINI in DOS.SYS loaded from disk
    ldy #>($17B0)               ;

    ldx ZBUFP
    bpl store_dosini_and_return

    lda #<($B440)               ; DOSINI under supercart
    ldy #>($B440)

store_dosini_and_return
    sta DOSINI                  ; store 'em!
    sty DOSINI+1
    clc
    rts

; ----------------------------------------------------------------------------

    nop
    nop

; ----------------------------------------------------------------------------

; This is the code that is checked against the ROM to see if it is present.

    .proc advance_zbufp_and_dbuf

    clc
    lda ZBUFP
    adc buffer_index
    tay                                 ; calculate new Y
    lda ZBUFP+1
    adc #0                              ; and new A

    .endp                               ; fall through!!

; ------------------------------------

    .proc set_zbufp_and_dbuf            ; set by Y and A

    sty ZBUFP
    sta ZBUFP+1

    sty DBUFLO
    sta DBUFHI

    rts

    .endp

; ------------------------------------

    .proc do_sio_with_daux_ay

    sta DAUX2       ; MSB
    sty DAUX1       ; LSB

    .endp

    .proc do_sio_without_setting_daux

    ldy #10                 ; retry circa 10 seconds
    lda #'R'                ; Read
    bcc do_not_load_mirror

    lda command_mirror      ; Default to Write

do_not_load_mirror
    sta DCOMND
    sty DTIMLO

; -----

; determine amount of bytes that will be transfered?

    lda #$80
    clc
    dex
    beq store_DBYT          ; single density

    ldx DAUX2
    bne _double_density

    ldx DAUX1
    cpx #$04
    bcc store_DBYT          ; first three sectors are 128 bytes

_double_density
    asl

store_DBYT
    sta DBYTLO              ; clever trick to get either $0080 or $0100
    rol                     ; SD carry is clear, DD carry is set
    sta DBYTHI

; -----

    ldy #$31            ; Disk drive D1:        $30+num
    sty DDEVIC

    ldy #$03            ; Number of retries
    sty FMZSPG+5        ; Temporary variable

retry
    ldx #$40            ; DSTATS for read and format

    lda DCOMND
    cmp #'R'            ; Read
    beq stats_and_call_sio

    cmp #'!'            ; Format!
    beq stats_and_call_sio

    ldx #$80            ; DSTATS for the rest

stats_and_call_sio
    stx DSTATS

    jsr SIOV            ; Call SIO

    bpl sio_done        ; Succes

    dec FMZSPG+5        ; The temp retry variable
    bne retry

sio_done
    ldx ICAX5Z
    lda DSTATS
    rts

    .endp

; ----------------------------------------------------------------------------

    .proc some_supercart_stuff

    ldy CARTLEFT+$0fff
    inc CARTLEFT+$0fff
    cpy CARTLEFT+$0fff
    beq L0869

    sty CARTLEFT+$0fff
    ldy #$08

L0869
    sty CARTIO+8
    sty store_a_to_cartio+1         ; Note: self modifying code here!
    rts

    .endp

; ----------------------------------------------------------------------------

    .proc store_a_to_cartio

    sta CARTIO                  ; modified by SMC
    rts

    .endp

; ----------------------------------------------------------------------------

BUFFER
    dta $00,$00,$00,$00
    dta $00,$00,$00,$00
    dta $00,$00,$00,$00

 

 

 

Edit: BTW you can assemble this with mads and the binary output is identical.

 

$ !mads
mads -o:bootcode.out bootcode.s && diff -s bootcode.dat bootcode.out
Writing object file...
430 lines of source assembled in 3 pass
384 bytes written to the object file
Files bootcode.dat and bootcode.out are identical

 

bootcode.s

Edited by ivop
added bootcode.s for download
  • Like 1
  • Thanks 2
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...