Jump to content
IGNORED

Compiling a new Atari OS...


reifsnyderb

Recommended Posts

4 hours ago, David_P said:

I think we all know that the only logical replacement for SelfTest is a game that fits in the 2K of ROM.

 

57 minutes ago, kheller2 said:

Perhaps some old Mac sounds.  I was particularly fond of the breaking glass sound. 

...and here I am trying to reclaim memory....

  • Haha 4
Link to comment
Share on other sites

How many BASIC ten liners or less can fit in 2K?

 

Runs and Hides!!!!

 

 

seriously though, fixing OS mistakes, making it more efficient, faster, and including truly useful functions is indeed the better path that is being taken, all the other fluff can go.

  • Like 1
Link to comment
Share on other sites

30 minutes ago, reifsnyderb said:

I liked the idea of having a boot-up similar to what the early PC's had.  So, I started it's implementation.

Just so you know... there are some programs that will break if the OS or BASIC prints extra lines. There are BASIC booters that work by writing a RUN command to line 2 and jam a RETURN key to start the BASIC program, and fail if the cursor is on another line. Algebra Quiz I is an example. This is why Altirra BASIC and BASIC XL/XE are careful to print their banners on a single line above where the normal READY line lines.

 

  • Like 5
Link to comment
Share on other sites

7 minutes ago, phaeron said:

Just so you know... there are some programs that will break if the OS or BASIC prints extra lines. There are BASIC booters that work by writing a RUN command to line 2 and jam a RETURN key to start the BASIC program, and fail if the cursor is on another line. Algebra Quiz I is an example. This is why Altirra BASIC and BASIC XL/XE are careful to print their banners on a single line above where the normal READY line lines.

 

Thanks for the heads up.  I guess the answer would be to do things differently if BASIC is enabled?

Link to comment
Share on other sites

There's methods to check extended Ram.  But generally you want to be nondestructive since some Doses support preservable Ramdisks.

 

The idea I had was to free up that Self-Test code which is largely useless but to also replace it with something compact.

Do people need reminder of their Ram config on every coldstart?  I don't really think so - about the only scenario might be the likes of U1Meg where you have multiple configs that can be selected.  Otherwise, the simple bit inversion test and a quick sign of pass/fail would be sufficient.

Link to comment
Share on other sites

1 hour ago, phaeron said:

Just so you know... there are some programs that will break if the OS or BASIC prints extra lines. There are BASIC booters that work by writing a RUN command to line 2 and jam a RETURN key to start the BASIC program, and fail if the cursor is on another line. Algebra Quiz I is an example. This is why Altirra BASIC and BASIC XL/XE are careful to print their banners on a single line above where the normal READY line lines.

 

If BASIC is enabled, I suppose that on boot the boot-up lines could display for a couple seconds then clear the screen. 

 

24 minutes ago, Rybags said:

There's methods to check extended Ram.  But generally you want to be nondestructive since some Doses support preservable Ramdisks.

 

The idea I had was to free up that Self-Test code which is largely useless but to also replace it with something compact.

Do people need reminder of their Ram config on every coldstart?  I don't really think so - about the only scenario might be the likes of U1Meg where you have multiple configs that can be selected.  Otherwise, the simple bit inversion test and a quick sign of pass/fail would be sufficient.

I was thinking that having the boot similar to early PC's could help to replace part of the self test.

Link to comment
Share on other sites

53 minutes ago, reifsnyderb said:

I was thinking that having the boot similar to early PC's could help to replace part of the self test.

in the case of limited space in the ROM, you add information that is completely unnecessary - such information is provided by any test program. A new ROM should increase the utility value 🙂

- S: update
- K: update
- 😄 update

- E: update
- update interrupt recognition system,
- adding the ability to run Basic scripts from the machine code level

 

there's more...

  • Like 4
Link to comment
Share on other sites

There will be as many opinions, as many users there are here... everyone would like to have something personal.

 

I would like to maintain maximum compatibility, yet I don't care about maintaining the extended RAM. I quite like your new startup sequence, but I also like the build in self-test (at least keyboard and RAM).

 

For the updated RAM test you may be able to use some parts of this tester: https://www.jammarcade.net/shoestrings-atari-8bit-ram-tester/

 

Possibly you could include some features of this binary patch: https://github.com/HiassofT/highspeed-sio

Edited by tzok
Link to comment
Share on other sites

10 hours ago, xxl said:

in the case of limited space in the ROM, you add information that is completely unnecessary - such information is provided by any test program. A new ROM should increase the utility value 🙂

- S: update
- K: update
- 😄 update

- E: update
- update interrupt recognition system,
- adding the ability to run Basic scripts from the machine code level

 

there's more...

There's a couple other factors here, too.  A couple weeks ago I never programmed anything in 6502 assembly and only did a tiny bit of inline assembly on a C compiler when I was writing some code for the FreeDOS project.  (I also wrote the Free FDISK program, but that's another story.)  So this is a learning process for me.  The other factor is I consider this an evolutionary process and there will be some dead-end turns.  Either way, I've started using compiler directives and it's really easy to add or remove features now.

 

I was thinking about adding a print spooler but since there is no way to predict what memory is going to be used by a program I figure there would be some serious compatibility problems.  But I am open to ideas for any driver updates.

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

5 hours ago, tzok said:

There will be as many opinions, as many users there are here... everyone would like to have something personal.

Agreed.

5 hours ago, tzok said:

 

I would like to maintain maximum compatibility, yet I don't care about maintaining the extended RAM. I quite like your new startup sequence, but I also like the build in self-test (at least keyboard and RAM).

My thought is that it may take up too much space to be concerned with all the possibilities of extended RAM. 

 

5 hours ago, tzok said:

 

For the updated RAM test you may be able to use some parts of this tester: https://www.jammarcade.net/shoestrings-atari-8bit-ram-tester/

I didn't see any source code for this.

 

5 hours ago, tzok said:

 

Possibly you could include some features of this binary patch: https://github.com/HiassofT/highspeed-sio

I added Atari's version of a fast SIO patch.  It's nowhere near as extensive but it didn't take up much space.

  • Like 1
Link to comment
Share on other sites

good job, but personally I would focus on making it more compatible with all the software that already exists. "there are many OS but there are always compatibility problems with some software, especially games". 😅


Another thing I tested your version I think it would be good if it detects if it has the function keys F1 to F4, if you don't have them it should not show it in the keyboard test.

Link to comment
Share on other sites

48 minutes ago, ascrnet said:

good job, but personally I would focus on making it more compatible with all the software that already exists. "there are many OS but there are always compatibility problems with some software, especially games". 😅

Thanks!  Checking compatibility with everything is almost impossible without a copy of everything.  I've been making sure that everything in the OS, that's at a fixed location, stays at that location.  Basically, there's vector tables and other fixed locations (i.e. the character sets) then there are the spaces in between.  The spaces in between change even from official Atari version to Atari version.

 

48 minutes ago, ascrnet said:


Another thing I tested your version I think it would be good if it detects if it has the function keys F1 to F4, if you don't have them it should not show it in the keyboard test.

The only way to handle this, that I can think of, is to have a special situation whereby F1 through F4 are only displayed when they are pressed.

Link to comment
Share on other sites

On 2/19/2023 at 1:33 AM, phaeron said:

Just so you know... there are some programs that will break if the OS or BASIC prints extra lines. There are BASIC booters that work by writing a RUN command to line 2 and jam a RETURN key to start the BASIC program, and fail if the cursor is on another line. Algebra Quiz I is an example. This is why Altirra BASIC and BASIC XL/XE are careful to print their banners on a single line above where the normal READY line lines.

 

If BASIC is enabled, there is now a 2 second delay (so you can check the text) then it clears the screen, positions the cursor in the upper left corner, and continues to boot.  Line 2 is now clear.

  • Like 1
Link to comment
Share on other sites

Latest test version here:  testos.rom

 

Atari had a version 5.0 of the OS, so I decided to make this version 5.99.

 

Review of changes from OS R 3:

 

;*        Revision 5.99 (600XL/800XL/65XE/130XE/800XE/1200XL)
;*        Added the following fixes and changes from Revision 3 (600XL/800XL/1450XLD) through
;*                Revision 3, Version 4  (600XL/800XL/1450XLD)
;*            Added IDCPU back to First 8k ROM Identification and Check
;*            Fix initial address for RAM sizing to $4000 (16k).
;*            Fix initial address for equivalence cartridge checksum to $BF00.
;*            Correct mishandling of NAK.
;*            Initialize PDVS to zero.
;*            Added support for internal parallel devices.  (IPDVI @ $D1CF and IPDIMK @ $0254)
;*            Accept device number 0 (like revision B did)
;*        Added the following change from Revision 4, Version 0 (600XL/800XL/1450XLD)
;*            Add support for SIO fast mode (38,400 baud).
;*        Processing of Control F1 through Control F4 no longer affects PORTB.
;*        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.
;*        Left margin set to 0.
;*        Shift-Help toggles international character set.
;*        Control-Help sets left screen margin to 0.
;*        Shift-Control-Delete cold starts the computer.
;*        BASIC loaded only when Option key held down
;*        Reduced footprint of self diagnostic system.    NEEDS DONE....CURRENTLY REMOVED
;*        Added support for CX85 Numeric Keypad in joystick port 2.
;*            Toggled via SHIFT-CONTROL-3 (#)
;*        Added compiler directives for selecting features.
;*        Added an option to install the Atari rainbow screen that was on early 1200XL's.
;*        Added boot messages to display system status at cold start.
;*        Cleared self test bank.
;*        Moved ROM checksum verification to self test bank.

 

I was able to get the CX85 Numeric Keypad working...finally.  @phaeron tipped me off to the problem being ALLPOT and to read POT3, instead.  After reading his advice, the information on POT0 in Mapping the Atari, and looking more into Atari's source code I was able to fix the problem.  One problem is I didn't see a way to emulate the CX85 in Altirra.  So, it had to be tested on hardware.  Atari's source code also showed that the CX85 was supposed to be read during VBI, not every NMI.  So, I put the JSR to the CX85 code in just before the OS read the POTx values.  There were still problems that I finally resolved by having the CX85 write debugging values into page 6.  Then, I could use PEEK, from BASIC, and see how I got the logic screwed up.  So, it's fixed.   🙂

 

Right now, there is no self test system...other than what is shown in the boot messages.  I need to add one and plan to make it a single screen, similar to what I posted earlier.

 

I am not entirely sure that SIO fast mode works.  If somebody can test it on real hardware and report back, that would be great!

 

I just installed this on my 600XL and it seems to work fine.

 

 

 

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

On 2/11/2023 at 5:43 PM, _The Doctor__ said:

@mr-atari, @classics, marius, myIDE II and what other device by atarimax utilized the keyhole, I forget, I believe the 32 in 1 OS in one devices used a keyhole of a kind as well, a 128 byte window and a 2K space within a location... it's sitting in my mind and can not recall the specifics at this time.

I'd think this method could be employed to get something in there only when needed.

 

It would require a small bit of hardware (pic/chip) to do I think, but it does provide a ram/rom that is useable in unique ways.

 

there was some talk about it when making a software method to access the hole in the myIDE or the pic for the 32in1.

I can't find all the threads about this but I know work was done for both, and a method to access the 32in1 after it was in use to provide an OS was a work in progress.

....

....

The MyIDE-II keyhole is accessible using the control-status of the cartridge.

It's perfectly emulated in Altirra.

 

Keyhole ranges $D580-$D5FF.

Other interesting feature is $D540-$D57F that mirrors $D500 the IDE-data register.

IDE registers are $D500-$D507 (also the secondary registers are accessible here)

 

$D508 - "Left" Cartridge  Page Register
$D50A - "Right" Cartridge Page Register
$D50C - Keyhole Page Register High-Byte
$D50D - Keyhole Page Register Low-Byte
$D50E - COMPACTFLASH  CONTROL REGISTER
$D50F - Control Register

 

I have a similar information about SIDE.

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

Ok.  I ran into a crisis situation.  Somewhere along the way, I broke the OS and it wouldn't run M.U.L.E. properly.  As we all know, this is absolutely unacceptable.  Since I have save multiple revisions of whatever code I am working on, I can easily go back.  But, I figured I could do better the second time.  So, I re-started with the XL/XE OS R3 and have made the changes listed below.  I haven't installed the high speed SIO patch yet.  Actually, I realized how the memory self test could be re-worked so as to give you an idea of which chip is bad.  So I think I'll take a good look at that next....time permitting.

 

;*        Revision 5.99
;*            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.
;*                   Mike Barall 07/24/84            
;*            Merged from Revision 59 (Arabic 65XE)
;*                Shift-Help toggles international character set.
;*            Changes by Brian E. Reifsnyder
;*                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.
;*                OS Version number is displayed on the main self test screen.
;*                Re-added F1-F4 keys to the keyboard self test.
;*                Fixed TXEB table for XE bank testing as per TXEB notes in Revision 3 (65XE/130XE)

 

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

  • 4 weeks later...

I don't mean this in a challenging way but why use space for a self test at all in a remade OS? You can boot a specialized app or OS (ala syscheck) for that at any point with a modernized Atari (U1MB or whatever). It seems like for everyday use, that memory would be more valuable for OS improvements.

  • Like 1
Link to comment
Share on other sites

5 minutes ago, gnusto said:

I don't mean this in a challenging way but why use space for a self test at all in a remade OS? You can boot a specialized app or OS (ala syscheck) for that at any point with a modernized Atari (U1MB or whatever). It seems like for everyday use, that memory would be more valuable for OS improvements.

I use the keyboard and memory checks.  But, that being said, what do you have in mind for the space?

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