invisible kid Posted February 16, 2023 Share Posted February 16, 2023 (edited) If you mean reversing the option/basic mechanics, OPTION=BASIC ON is much much much more convenient. Advanced users will be using this, and even if we get caught by surprise by the reversal, we will learn and appreciate I think. Edited February 16, 2023 by invisible kid 3 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 16, 2023 Author Share Posted February 16, 2023 5 minutes ago, invisible kid said: If you mean reversing the option/basic mechanics, OPTION=BASIC ON is much much much more convenient. Advanced users will be using this, and even if we get caught by surprise by the reversal, we will learn and appreciate I think. Yes. Right now you have to hold the option key down to enable BASIC. So, booting up without any devices, nor touching the option key, goes straight to the self test. 1 Quote Link to comment Share on other sites More sharing options...
Mathy Posted February 16, 2023 Share Posted February 16, 2023 Hello Brian If you're thinking about removing or replacing the audio test, how about something that tests for the presence of a second Pokey? Sincerely Mathy Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted February 16, 2023 Share Posted February 16, 2023 Basic on or off can be controlled via software and always has been except for the original cartridge but there might be trick to that as well. I would have loved that feature to have been utilized on boot disk commercial games for sure. Fun times. I had to reverse the Altirra tick mark for BASIC. This isn't an all the time logic reversal correct, as in it only affects option during boot time like other solutions and not BASIC control across the spectrum. Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 16, 2023 Author Share Posted February 16, 2023 1 hour ago, Mathy said: Hello Brian If you're thinking about removing or replacing the audio test, how about something that tests for the presence of a second Pokey? Sincerely Mathy Hello, That's an option, of course. I am worried about going down that path due to feature creep. Something else could be put in other than the self test. But, there's only 2k to work with. I was actually contemplating the ACE 80XL until I found out it was 4k. lol I am open to suggestions. Best Regards, Brian Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 Once I removed the music note display, from the audio/visual test, I was able to stuff almost the entire self test code into the self test bank with 68 bytes to spare. Outside of the self test bank, there is now 1,119 bytes free. There is now plenty of space to put that peripheral handler loading facility, that was hidden for 40 years and never used, back in. 4 Quote Link to comment Share on other sites More sharing options...
Pfaffa Posted February 17, 2023 Share Posted February 17, 2023 (edited) Awesome! I heard it said the self-test was primarily a marketing tool anyways. Edited February 17, 2023 by Pfaffa Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted February 17, 2023 Share Posted February 17, 2023 (edited) The Self Test was broken but fixable, It all could have been combined into one screen with the memory test fixed it could have helped with a number of diagnose my crap scenarios. Pokey/Graphics test was NOT really useful that's pretty certain. Edited February 17, 2023 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 It looks like the Peripheral Handler Loading Facility takes up over 800 bytes. It's almost back in. I hope to see somebody make something for it within a few months. 😕 Realistically, there is about 284 usable bytes left. Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 Support now added for internal parallel devices. (It only took 10 bytes. 🙂 ) I found code for the numeric keypad and am thinking about making it part of the OS. Thoughts? Current status: ;* Revision 4.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 changes from Revision 4, Version 0 (600XL/800XL/1450XLD) ;* Add support for SIO fast mode (38,400 baud). ;* Fix TXEB table for XE banking. ;* 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. ;* Added OS version number to self test main menu ;* Re-added F1-F4 keys to the keyboard self test. ;* 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 Test system. ;* Brian E. Reifsnyder 02/16/2023 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 (edited) Latest ROM file: testos.rom Remember: Boot with Option key for BASIC Edited February 17, 2023 by reifsnyderb 2 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 (edited) The first support for the CX85 Numeric Keypad is compiled in. It can be enabled (toggled) via SHIFT-CONTROL-3. (3 was picked because it's SHIFT/3 is the pound or number sign) The computer boots up with this support disabled so that 2 player games of MULE can be played without a problem. Also, the keypad support is on joystick port 2. I left the function keys as per Atari's example code: https://atariwiki.org/wiki/attach/AtariCX85/Atari_CX85_Numerical_Keypad_Technical_Reference_Notes_1_page.pdf But the return key (F1) and backspace key (F2) are hokey. I'll have to look into that some more. Tested with real hardware..... testos.rom Edited February 17, 2023 by reifsnyderb 3 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 The logic looks good. I am wondering if the problem with F1 and F2 is my keypad. Through BASIC, it returns the right values, though. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted February 17, 2023 Share Posted February 17, 2023 You are not confusing F1 & F2 of Atari Main Keyboard with F1 & F2 of CX85 i/o port keyboard possibly? 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 4 minutes ago, _The Doctor__ said: You are not confusing F1 & F2 of Atari Main Keyboard with F1 & F2 of CX85 i/o port keyboard possibly? No. The F1 key is returning a 0 and the '0' key is returning a 0. The F1 key is special because ALLPOT is read. Bit 4 is masked out, inverted, and shifted to the left. That result is OR's with PORT A (which is right shifted 4 times) to become the number looked up in a table. Like this: CX85 = * ;entry LDA STRIG1 ;Key pressed? BNE CX8510 ;Exit if key not pressed LDA #$00 ;Reset attract mode STA ATRACT ; Determine value of key pressed LDA PORTA ;Read port 2 LSR A LSR A LSR A LSR A STA CX85T LDA ALLPOT ;Read ALLPOT for 5th cable pin stat AND #$08 ;BPOT bit mask EOR #$08 ;Invert bit ASL A ORA CX85T ;A has key value LDY #$00 ;Table index CX851 CMP TCX85,Y ;Check for match BEQ CX852 ;If found, proccess the value INY INY LDX TCX85,Y ;End of table? BEQ CX8510 ;Exit BNE CX851 ; Put new keycode in CH, reset auto-repeat CX852 TAX ;Save key value INY ;Get POKEY keycode LDA TCX85,Y ;TCX85,Y CMP #$FF ;Use function key vector table? BEQ CX8510 ; EXIT FOR NOW ADD VECTOR CODE LATER CMP CX85CC ;Same as previous keycode? BEQ CX855 STA CX85CC ;Store new keycode STA CH ;Put keycode in character buffer LDA #$30 ;Reset CX85 timer STA CX85RP BNE CX854 ;Reset BRK flag and exit CX853 LDA #$C0 ;Use dummy value STA CX85CC CX854 LDA #$01 ;Reset BRK flag ;STA BNE CX8510 ;Exit ; This key is the same as the prior key, check auto-repeat CX855 LDX CX85RP ;Auto repeat expired? DEX BNE CX856 ;Branch repeat not expired STA CH ;Store keycode LDA #$06 ;Reset timer shorter for repeat characters STA CX85RP BNE CX854 ;Reset BRK flag CX856 STX CX85RP ;Store new auto repeat timer value ; Exit CX8510 RTS ; SPACE 4,10 ;** TCX85 - CX85 Keypad Translation Table ;* ;* TCX85 DB $0C,$0C ;Function 1 DB $14,$34 ;Function 2 DB $10,$07 ;Function 3 DB $18,$26 ;Function 4 DB $1C,$32 ;0 DB $19,$1F ;1 DB $1A,$1E ;2 DB $1B,$1A ;3 DB $11,$18 ;4 DB $12,$1D ;5 DB $13,$1B ;6 DB $15,$33 ;7 DB $16,$35 ;8 DB $17,$30 ;9 DB $1D,$22 ; . DB $1F,$0E ; - DB $1E,$06 ; + ENTER DB $00 ;End of table 1 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 I put in some compiler directives so that features can easily be added and/or removed. There's even something for @Mathy here. .define CCX85 TRUE ;CX85 Numeric Keypad .define FUJI FALSE ;Atari Fuji Screen .define PHLF TRUE ;Perpheral Handler Loading Facility 3 Quote Link to comment Share on other sites More sharing options...
+CharlieChaplin Posted February 17, 2023 Share Posted February 17, 2023 So, looking at your latest OS changes, I wonder what was removed or changed in the OS to make space for the various fixes and addendums ? Was it only the (now simplified) Selftest ? Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 17, 2023 Author Share Posted February 17, 2023 47 minutes ago, CharlieChaplin said: So, looking at your latest OS changes, I wonder what was removed or changed in the OS to make space for the various fixes and addendums ? Was it only the (now simplified) Selftest ? Yes. The space eventually came from self test space. There is a lot of self test code and related tables outside of the banked self test area. Once I removed the self test code a lot of space was made. I was also able to move almost all of the self test code into the bank. 3 Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 18, 2023 Author Share Posted February 18, 2023 (edited) After studying the code and realizing that the only key that isn't working right is the F1 key on the CX85, I am thinking the problem may be my CX85. But, I can't confirm this as I don't have another to try. If anyone has a CX85 and can test this that would be great! I changed the CX85 keys around to what was specified in the instruction book as opposed to the programming book. In the instruction book the function keys are arrow keys and the "enter" key is a return key. Here's the latest build. testos.rom This one is compiled with the Atari rainbow logo...just for grins. Edit to add: Boot with Option for BASIC and Shift/Control/3 toggles the CX85 driver on and off. The CX85 works on port 2. Edited February 18, 2023 by reifsnyderb 2 Quote Link to comment Share on other sites More sharing options...
phaeron Posted February 18, 2023 Share Posted February 18, 2023 - NMI interrupt (VBI) 4671:248: 18 | A=FF X=80 Y=01 S=F2 P=37 ( IZC) | C018: 2C 0F D4 BIT NMIST 4671:248: 22 | A=FF X=80 Y=01 S=F2 P=75 ( V I C) | C01B: 10 03 BPL $C020 4671:248: 26 | A=FF X=80 Y=01 S=F2 P=75 ( V I C) | C020: D8 CLD 4671:248: 28 | A=FF X=80 Y=01 S=F2 P=75 ( V I C) | C021: 48 PHA 4671:248: 32 | A=FF X=80 Y=01 S=F1 P=75 ( V I C) | C022: 8A TXA 4671:248: 35 | A=80 X=80 Y=01 S=F1 P=F5 (NV I C) | C023: 48 PHA 4671:248: 39 | A=80 X=80 Y=01 S=F0 P=F5 (NV I C) | C024: 98 TYA 4671:248: 42 | A=01 X=80 Y=01 S=F0 P=75 ( V I C) | C025: 48 PHA 4671:248: 46 | A=01 X=80 Y=01 S=EF P=75 ( V I C) | C026: 8D 0F D4 STA NMIRES 4671:248: 51 | A=01 X=80 Y=01 S=EF P=75 ( V I C) | C029: AD 60 02 LDA $0260 4671:248: 56 | A=00 X=80 Y=01 S=EF P=77 ( V IZC) | C02C: F0 03 BEQ $C031 - 4671:248: 60 | A=00 X=80 Y=01 S=EF P=77 ( V IZC) | C031: 20 4D CA JSR $CA4D 4671:248: 66 | A=00 X=80 Y=01 S=ED P=77 ( V IZC) | CA4D: AD 85 02 LDA STRIG1 4671:248: 70 | A=00 X=80 Y=01 S=ED P=77 ( V IZC) | CA50: D0 53 BNE $CAA5 4671:248: 72 | A=00 X=80 Y=01 S=ED P=77 ( V IZC) | CA52: A9 00 LDA #$00 4671:248: 74 | A=00 X=80 Y=01 S=ED P=77 ( V IZC) | CA54: 85 4D STA ATRACT 4671:248: 77 | A=00 X=80 Y=01 S=ED P=77 ( V IZC) | CA56: AD 00 D3 LDA PORTA 4671:248: 81 | A=CF X=80 Y=01 S=ED P=F5 (NV I C) | CA59: 4A LSR 4671:248: 83 | A=67 X=80 Y=01 S=ED P=75 ( V I C) | CA5A: 4A LSR 4671:248: 85 | A=33 X=80 Y=01 S=ED P=75 ( V I C) | CA5B: 4A LSR 4671:248: 87 | A=19 X=80 Y=01 S=ED P=75 ( V I C) | CA5C: 4A LSR 4671:248: 89 | A=0C X=80 Y=01 S=ED P=75 ( V I C) | CA5D: 8D 63 02 STA $0263 4671:248: 93 | A=0C X=80 Y=01 S=ED P=75 ( V I C) | CA60: AD 08 D2 LDA ALLPOT This is too late to read ALLPOT. The official definition of ALLPOT in the Hardware Manual is that 0 = valid, 1 = invalid for each POT0-7 register. But what it actually means is whether the POTn registers are actively loading from the master counter that counts up from 0 for each scanline during the pot scan. While the caps are charging and the input is below threshold, the ALLPOT bit is 1 and the POTn register continually updates from the master pot scan counter. It flips to 0 once the register stops updating and the value is locked in, which happens either when the cap voltage reaches threshold or the scan finishes. Normal pot scan takes 228 scanlines and is triggered by stage 2 VBI around scanline 256, so the scan is always completed at the start of the VBI. This guarantees ALLPOT=0 at the start of the VBI, which is why your code is sensing the 0 key rather than the ESCAPE key. Try using POT3 instead. 1 1 Quote Link to comment Share on other sites More sharing options...
ClausB Posted February 18, 2023 Share Posted February 18, 2023 On 2/16/2023 at 3:55 PM, reifsnyderb said: Something else could be put in other than the self test. But, there's only 2k to work with. I was actually contemplating the ACE 80XL until I found out it was 4k. The code is less than 2K and the charset is 1K. The charset could go in place of the international character set. 1 1 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 18, 2023 Share Posted February 18, 2023 (edited) If I was removing the Self-Test I'd insert some powerup code to give feedback on the initial Ram test on coldstart. Maybe something like 1/10th second green background then go to black and continue for a pass. 1/5th second red background, maybe have a beep as well then go to black and continue for a fail. Edited February 18, 2023 by Rybags 1 Quote Link to comment Share on other sites More sharing options...
+kheller2 Posted February 18, 2023 Share Posted February 18, 2023 29 minutes ago, Rybags said: If I was removing the Self-Test I'd insert some powerup code to give feedback on the initial Ram test on coldstart. Maybe something like 1/10th second green background then go to black and continue for a pass. 1/5th second red background, maybe have a beep as well then go to black and continue for a fail. What? No Beeps? I think you should have beeps just like ye'ol PCs. HAH Quote Link to comment Share on other sites More sharing options...
+CharlieChaplin Posted February 18, 2023 Share Posted February 18, 2023 1 hour ago, kheller2 said: What? No Beeps? I think you should have beeps just like ye'ol PCs. HAH And some numbers counting the RAM (fast) in Bytes or KBytes (nice for upgraded machines with more than 64KBytes)... Or maybe some horizontal RAM bar that shows RAM size, more RAM = longer bar (aka my bar is bigger than yours)... Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted February 18, 2023 Author Share Posted February 18, 2023 (edited) 5 hours ago, kheller2 said: What? No Beeps? I think you should have beeps just like ye'ol PCs. HAH 4 hours ago, CharlieChaplin said: And some numbers counting the RAM (fast) in Bytes or KBytes (nice for upgraded machines with more than 64KBytes)... Or maybe some horizontal RAM bar that shows RAM size, more RAM = longer bar (aka my bar is bigger than yours)... Maybe a combination of ideas? That would greatly reduce the memory usage. Showing extended memory would be nice, too. However, I don't know how much code would be needed to show all possibilities. (i.e. RAMBO vs Compy, etc.) If somebody has some code that could scan this, and is willing to have it added, I would certainly be interested in adding it if there is space. Edited February 18, 2023 by reifsnyderb Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.