Jump to content
IGNORED

Compiling a new Atari OS...


reifsnyderb

Recommended Posts

Version 6.19.  Now with Wozmon! 

 

Thanks to @freetz for porting Wozmon to the Atari!

 

Right now, you need to have a normal E: 40 column text window up.  i.e.  From BASIC

Shift/Control/W enters Wozmon

 

From BASIC, you can enter via X=USR(65513)

 

X only works when entering from BASIC via the above USR command.

 

Instructions are here:  https://forums.atariage.com/topic/352757-atari-wozmon-for-abbuc-software-contest-2023

 

OS619.rom

AtariOS_6_19_source.s

 

For myself, Wozmon has been coming in handy to troubleshoot the 1090 card I am working on.   🙂

 

 

  • Like 7
  • Thanks 2
Link to comment
Share on other sites

Nice! I'm glad WozMon comes in handy here! By the way: The reason it crashed when you entered "RUN" is because you didn't exit WozMon (using "X"), and "R" means "Run at address". Since "UN" is not a valid address, the code probably jumpt who-knows-where and thus crashed the Atari.

What I didn't get is how you entered WozMon using "DOS"? Or did you just enter DOS and then hit Shift/Control/W?

 

And do you really have a 1090? That's so cool - and great if WozMon can come in handy here :)...

Link to comment
Share on other sites

9 minutes ago, freetz said:

Nice! I'm glad WozMon comes in handy here! By the way: The reason it crashed when you entered "RUN" is because you didn't exit WozMon (using "X"), and "R" means "Run at address". Since "UN" is not a valid address, the code probably jumpt who-knows-where and thus crashed the Atari.

What I didn't get is how you entered WozMon using "DOS"? Or did you just enter DOS and then hit Shift/Control/W?

Hello!  The video wasn't made by me.  Looking at the video, it appears he typed DOS and then hit Shift/Control/W with his left hand only.

 

 

9 minutes ago, freetz said:

And do you really have a 1090? That's so cool - and great if WozMon can come in handy here :)...

I have an upgraded version of a reproduction 1090XL board and created a smaller, 1090 compatible, board called a 1091XL.  With those, I've created some new 1090XL boards and have been working on one that has a RAM Disk.  Other boards provide 320k of RAM, provide an 80 column display, interface to a CX-85 numeric keypad, provide firmware (such as an OS upgrade...as long as nothing messes with PORTB), and improve compatibility with a 130XE.  The RAM Disk board is close to working but still has some issues.

 

 

 

Link to comment
Share on other sites

2 hours ago, dabone said:

Any chance of getting a version of this that forces PAL? 

 

I'm looking at the mod here.

 

https://www.myatari.com/nirdary.html

 

I'm only swapping the Antic chip.

 

This looks like a simple change to force the OS into PAL mode.  Also, it appears the ANTIC chip needs swapped.  I'll have to experiment.

 

  • Like 2
Link to comment
Share on other sites

39 minutes ago, dabone said:

Do you have instructions for compiling your current source under windows?

 

 

 

I don't, no.  I use ca65 (https://cc65.github.io/doc/ca65.html), which works both in Windows and LInux.

 

I have a script to compile it as follows:

 

ca65 -t atari -l source.lst source.s
ld65 -C xl.cfg source.o
./fppatcher Fast_Math_v_F_plus.rom a.out nochecksum.rom
./setchecksum-xl nochecksum.rom testos.rom
chmod 664 testos.rom
chown reifsnyderb:reifsnyderb testos.rom
wine patchrom -p testos.rom patchedos.rom
cp testos.rom /home/reifsnyderb/Altirra/ROMs
cp patchedos.rom /home/reifsnyderb/Altirra/ROMs
cp patchedos.rom /home/reifsnyderb/Altirra/extras/sampledevices/fwb_osrom.rom
chown reifsnyderb:reifsnyderb /home/reifsnyderb/Altirra/extras/sampledevices/fwb_osrom.rom

 

 

fppatcher.c is....

 

fppatcher.c

 

xl.cfg is...

 

xl.cfg

 

The fast math ROM is...

 

Fast_Math_v_F_plus.rom

 

patchrom is from the HIAS high speed SIO patch.

 

I think that covers most of it.  You'll have to put it together for your build environment.

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

A few steps missing in the instructions, but I've managed to get it going.

 

You'll need to build fppatcher.c using the command gcc fppatcher.c -o fppatcher

 

You will also need the a8-os-rom-2018-09-23.7z.txt from the following thread.

 

Grab the camac.inc and the setchecksum-xl.c files from the ca65-src directory and then make sure you compile setchecksum-xl with the command gcc setchecksum-xl.c -o setchecksum-xl

 

This is under ubuntu, I didn't find windows versions of fppatcher and setcheckup-xl.

 

I did a quick patch at line 2486-2496 to try.

 

Runs on Altirra, and reports PAL under the Self test.

 

 

 

AtariOS_6_19-pal-patch.s

Edited by dabone
  • Like 3
Link to comment
Share on other sites

  • 8 months later...
Posted (edited)

Every now and then I've been making some progress with OS 6.20.

 

Currently, OS 6.20 has the following improvements...

 

;*        Revision 6.20
;*          Finished integration between OS and firmware board.  (Works in emulation.)
;*          Bug in CCR found by kenames99 on AA.  Bug fix is to replace BCS with BCC.
;*          Compatibility bugs with 1090 80 CVC found by kenames99 on AA.  Bugs were fixed by BER.
;*          WozMon now entered using SHIFT-CONTROL-INVERSE
;*        Peripheral Handler Loading Facility can be compiled out by setting PHLF to FALSE.
;*        SBR3 fix to save 2 bytes
;*        FTX fix to save 2 bytes
;*        SCB1 fix to save 1 byte
;*        WCB fix to save 1 byte
;*        Improved Cassette Handler:  Reading RTCLOK+2 and VCOUNT, in SBR,
;*          will now avoid VBI.  Code "borrowed" from AltirraOS
;*        Brian E. Reifsnyder (??/??/2024)

 

 

One "big" improvement is that I think the cassette handler is working better.  After making the change to the cassette handler code, I am now able to reliably load a 30+k BASIC program I was never able to reliably load before....and this is with real hardware!  Thanks go to @phaeron for pointing this out, offering advice, and for his AltirraOS.  🙂

 

More info here:  https://forums.atariage.com/topic/358862-altirra-420-released/page/13/#comments

 

I may make a couple more changes before releasing this update.

 

 

 

Edited by reifsnyderb
  • Like 10
Link to comment
Share on other sites

  • 2 weeks later...

OS 6.20 is now out.   🙂

 

Change log going back to Atari's OS 3

 

;*        Revision 3 (65XE/130XE)
;*        Fix initializing of CHKSUM.
;*        R. K. Nordin    03/23/84
;*        Update self-test for 130XE keyboard and RAM.
;*        ???    ??/??/??
;*
;*        Revision 6.00
;*            Merged from Revision 3 (600XL/800XL/1450XLD)
;*                Fix MAXDEV, problems resulting from CRASS65 version,
;*                    initial address for RAM sizing, "Boot Error" message,
;*                    initial address for cartridge equivalence checksum,
;*                    mishandling of SIO NAK, and initializing of CHKSUM.
;*                R. K. Nordin    03/27/84    
;*            Merged from Revision 3, Version 2 (600XL/800XL/1450XLD)                                                                        
;*              Dedicate PDVI ($D1FF) to external parallel device IRQ status
;*                Dedicate IPDVI ($D1CF) to internal parallel device IRQ status                                                                        
;*                Using PDIMSK ($0249) for external parallel device IRQ selection mask
;*                Using IPDIMK ($0254) for internal parallel device IRQ selection mask                                                             
;*                After masking (PDVI, PDIMSK) & (IPDVI, IPDIMK), OR the result
;*                    together, prior to processing parallel device IRQ                                                     
;*                On cold start, initialize PDVI = 0, to avoid potential
;*                    checksum error.
;*                Y. T. JANG, V. WU    02/22/84
;*            Merged from Revision 3, Version 3  (600XL/800XL/1450XLD)
;*                Dedicate the 11 bytes at ACMVAR ($3ED-$3F7) for use as
;*                    a RESET routine area.  On warmstart, the OS will JSR
;*                    to ACMVAR immediately after initializing hardware.
;*                MIKE BARALL        06/08/84
;*            Merged from Revision 3, Version 4  (600XL/800XL/1450XLD)
;*                Make CIO accept device number 0 (like Rev B did).
;*                MIKE BARALL        06/21/84
;*            Merged from Revision 4, Version 0 (600XL/800XL/1450XLD)
;*                In PBK, change DEC BRKKEY to STA BRKKEY.
;*                Add support for SIO fast mode (38400 baud).
;*                   Mike Barall 07/24/84            
;*            Merged from Revision 59 (Arabic 65XE)
;*                Shift-Help toggles international character set.
;*            Changes by Brian E. Reifsnyder (4/20/2023)
;*                Shift-Control-Delete cold starts the computer.            
;*                Control-Help sets left screen margin to 0.
;*                Processing of Control F1 through Control F4 no longer affects PORTB.
;*                Left margin set to 0.
;*                Reduced KRPDEL from 48 to 20 for NTSC and from 40 to 20 for PAL.
;*                Reduced KEYREP from 6 to 4 for NTSC and from 5 to 4 for PAL.
;*                Cleaned up and reorganized KIR.
;*                Re-added F1-F4 keys to the keyboard self test.
;*                Re-wrote the majority of the self test to conserve space.                
;*                Removed PUPBT1 to fix HATABS overlap of first power-up validation byte.
;*                Added a built-in CX85 numeric keypad handler for joystick port 2.  
;*                    Shift-Control-3 (#) to toggle on/off.
;*                Atari BASIC version now displayed on self test screen.
;*                Self test now displays which bit(s) failed the memory test.
;*                Video type displayed on self test screen.
;*                Patched with Fast Math F+ floating point package.
;*
;*        Revision 6.10
;*             Moved Self-test, Part 3, into self-test bank.
;*            ROM Checksum now only checked during self test.
;*             Re-added power-up validation byte PUPBT1 at $026A
;*             Reduced SIO command retries (CRETRY/CRETRI) to 4 to reduce boot time
;*            Removed Shift-Help international character set toggle due to Highspeed SIO patch.
;*            Removed support for SIO fast mode (38400 baud) -- Support was for non-released Atari drive.
;*            Removed LNBUG compiler directives.
;*            Removed RANSYS compiler directives.
;*            Removed ACMI compiler directives.
;*            Patched with Highspeed SIO patch V 1.33 (2023 version).
;*                SHIFT-CONTROL-S Clears SIO speed table/enables highspeed SIO
;*                SHIFT-CONTROL-N Disables highspeed SIO
;*                SHIFT-CONTROL-H Enables highspeed SIO
;*            Locations of SIO and KIR are now fixed so as to work properly with Highspeed SIO patch.
;*            Clear self test screen RAM prior to use.
;*            Boot with SELECT key down to disable Highspeed SIO.
;*            Brian E. Reifsnyder (8/7/2023)
;*
;*        Revision 6.11
;*            OS can now reside on a 1090XL/1091XL firmware board.  (Under development)
;*            A vector has been added at $FFEC to re-initiallize the OS by a
;*                1090XL/1091XL firmware board.
;*            Added OSCFG1 and OSCFG2 bytes for OS configuration from non-volatile RAM.
;*            Added PBICFG byte to support enable/disable of compatible PBI devices.
;*            Brian E. Reifsnyder (11/23/2023)
;*
;*        Revision 6.19
;*          Added The WOZ Monitor for the Apple 1
;*            Written by Steve Wozniak in 1976
;*            Ported to the Atari 8-Bit by Frederik Holst in 2022/23 for ABBUC Software Contest 2023
;*            Enter from BASIC at $FFE9 using X=USR(65513)
;*            Enter at any time using SHIFT-CONTROL-W
;*            Brian E. Reifsnyder (12/2/2023)
;*
;*        Revision 6.20
;*          Finished integration between OS and firmware board.  (Works in emulation.)
;*          Bug in CCR found by kenames99 on AA.  Bug fix is to replace BCS with BCC.
;*          Compatibility bugs with 1090 80 CVC found by kenames99 on AA.  Bugs were fixed by BER.
;*          WozMon now entered using SHIFT-CONTROL-INVERSE
;*        Peripheral Handler Loading Facility can be compiled out by setting PHLF to FALSE.
;*        Peripheral Handler Loading Facility is now compiled out.
;*        SBR3 fix to save 2 bytes
;*        FTX fix to save 2 bytes
;*        SCB1 fix to save 1 byte
;*        WCB fix to save 1 byte
;*        Improved Cassette Handler:  Reading RTCLOK+2 and VCOUNT, in SBR,
;*          will now avoid VBI.  Code "borrowed" from AltirraOS
;*        Merged from Revision 10 (1200XL)
;*          JMPERS scan added and still doesn't work right.   (Currently disabled.)
;*        Jumper 1, W1 on Atari system boards, now executes self test when removed.  (Once JMPERS scan is fixed.)
;*        Jumper 2, on 800XL remake board by BER, now disables the attract mode when removed. (Once JMPERS scan is fixed.)
;*        The Altirra BASIC version is now displayed from Self Test screen when PHLF is not compiled in.
;*        On a 16k system, the Self Test screen now only shows 1 row of dots for the memory test.
;*        Brian E. Reifsnyder (1/2/2024)

 

 

OS62STScreen.thumb.jpg.2ddf167d798342fdf8a872d83ff1b42c.jpg

 

Here's the ROM and Source Code:

 

OS620.rom

 

OS620.s

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Like 5
  • Thanks 2
Link to comment
Share on other sites

I just found a minor bug on the Self Test screen whereby the wrong number of dots would be displayed on a 64k system.  It's fixed.

 

;*        Revision 6.21
;*        Fixed a bug whereby the Self Test screen would only show 1 row of dots on a 64k system with BASIC enabled.
;*        Brian E. Reifsnyder (9/2/2024)

 

Here's OS 6.21:

 

OS621.rom

 

OS621.s

 

 

 

 

 

 

  • Like 4
  • Thanks 2
Link to comment
Share on other sites

As for entering WozMon via keyboard shortcut, would it be possible to use a different entry point address when using BASIC compared to evoking it from DOS etc.? My main use-case would be evoking it from BASIC, but I can see that others would use it from DOS. However, when I evoke it from BASIC, it seems to use the run address without the required PLA instruction at the beginning, so in order to be able to return to the BASIC code, I'd have to remember the X=USR address. When invoking it from DOS, DOS doesn't call the code via a JSR, so there is no way to return to DOS anyway without knowing the DOS vector, so using the "X" command of WozMon wouldn't work anyway.

So if it would be possible to have some kind of BASIC/non-BASIC detection and perform the jump accordingly, that would be the best option.

Edited by freetz
  • Like 1
Link to comment
Share on other sites

1 hour ago, freetz said:

As for entering WozMon via keyboard shortcut, would it be possible to use a different entry point address when using BASIC compared to evoking it from DOS etc.? My main use-case would be evoking it from BASIC, but I can see that others would use it from DOS. However, when I evoke it from BASIC, it seems to use the run address without the required PLA instruction at the beginning, so in order to be able to return to the BASIC code, I'd have to remember the X=USR address. When invoking it from DOS, DOS doesn't call the code via a JSR, so there is no way to return to DOS anyway without knowing the DOS vector, so using the "X" command of WozMon wouldn't work anyway.

So if it would be possible to have some kind of BASIC/non-BASIC detection and perform the jump accordingly, that would be the best option.

I just checked and there is space to do this.  Right now, X=USR(65513)  will run WozMon from BASIC.  It would be possible, of course, to make 65510 the entry point for DOS.

 

Edit:  I added this vector for the next release.

 

Edited by reifsnyderb
  • Like 2
Link to comment
Share on other sites

I had a request for the OS to run from RAM as well.  The next release will be able to do just that.   🙂

 

 

Current status:

 

;*      Revision 6.3
;*        Added WozMon DOS start vector at $FFE6  (TO-DO:  Fix X from WozMon.)
;*        Memory size scan now stops at $C000 so as to support a RAM-based OS.
;*        LNBUG LNFLG now set to $00 to improve program compatiblity.
;*        Removed firmware board support since it is now redundant.
;*        Added logic to determine whether OS is located in ROM or RAM.
;*        Added the capability to load and execute the OS from RAM.

 

 

 

  • Like 5
Link to comment
Share on other sites

OS 6.30 is now available!

 

This version is aware of when it's running off of RAM and can either run from the RAM or ROM.

 

Also, I have a DOS .atr file attached that can permit the OS to be loaded from a disk.  To load the OS, from a disk, do the following:

1.  Either make a floppy disk or mount the .atr where an emulator or Atari can use it.  (Lots of options here.)

2.  Boot the disk.

3.  Load DOS.  (If need be, type "DOS" from the BASIC prompt.)

4.  Select "L"

5.  Enter the program as "OSLOADER.COM"

6.  A message will appear to tell you the OS is loading.  After it's loaded, the computer will reboot and OS 6.30 will be running.

 

Notes: 

 

1.  At this time, no self test will load if the OS is in RAM.

2.  On the disk (atr), the OS is the OS.BIN file.  I made it separate from the OS Loader program so it's easier to test and the ROM can easily be changed.

3.  I've included the OS Loader source code as an example.

4.  This version should be able to be installed from both a disk and special cartridge.

5.  The OS Loader program could be improved to allow for other options or to require a key be pressed prior to re-booting the system.  (i.e.  To change disks.)

 

 

ROM:

 

OS630.rom

 

OS Source:

 

OS630.s

 

DOS 2.5 ATR

 

Dos 2.5 w OS 630.atr

 

OS Loader:

 

osloader.com

 

OS Loader Source:

 

osloader.s

 

 

 

 

  • Like 10
  • Thanks 1
Link to comment
Share on other sites

25 minutes ago, freetz said:

What is the BASIC entry vector for WozMon now? Neither 65513 nor 65510 (0xFFE6) work...

It's 65513.  (i.e.  x=usr(65513)   )    I just tested on real hardware and it's working.  Are you running it from RAM or ROM?  I just tried it from RAM, in emulation, and that worked for me as well.  Do you have anything non-stock on your computer?

Link to comment
Share on other sites

Since the 1200XL has those LEDs, and I disabled the LED controls so as to not interfere with RAM banking, the 1200XL LEDs won't work on OS Version 6.30.  However, now that that unused peripheral handler loading facility has been compiled out, there is a decent amount of space.  (I've been maintaining the ability to compile the peripheral handler loading facility with compiler directives.  Since it takes extra space, any features that take up that space will be compiled out if the peripheral handler loading facility is compiled in.)  So, I added some code to check to see if banks exist when cold starting the computer.  If banks don't exist, the LEDs will once again work.  As LED 2 was linked to the international character set, and that has been replaced by the HIAS High Speed SIO, LED 2 now blinks on SIO access.

 

;*      Revision 6.31
;*        Added a scan, upon cold start, to see if RAM banks exist.
;*        Keyboard LED 1, on a 64k 1200XL, now lights up when the keyboard is disabled.
;*        Keyboard LED 2, on a 64k 1200XL, now lights up during SIO access.

 

No ETA on this release, though, as I may find a couple more features to add.   🙂

 

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