Jump to content

slx

+AtariAge Subscriber
  • Posts

    3,396
  • Joined

  • Last visited

About slx

Profile Information

  • Gender
    Male
  • Location
    Vienna, Austria
  • Interests
    Atari since 1983, Aviation even longer, HP Calcs on & off
  • Currently Playing
    this round's HSC games
  • Playing Next
    next round's HSC games ;-)

Recent Profile Visitors

15,242 profile views

slx's Achievements

River Patroller

River Patroller (8/9)

2k

Reputation

  1. There’s a current project to 3D-print pen holders that will take cut-off ball-point pen innards.
  2. With BASIC XE (and other advanced variants) you can actually use DPEEK(183) and BASIC will multiply and add the contents of 184 on its own. (In case you wonder what this is good for to start with, the 6502 stores numbers larger than 256 in two subsequent memory locations, the first one being the lower half or LSB. To get a two-byte number you PEEK it and add 256 times the value of the following byte.)
  3. I learned it from Rodney Zaks’ book combined with Antic articles and De Re Atari. I am pretty sure I wasn’t clever enough to come up with that myself but copied the idea from some code I saw but don’t have the faintest idea where that might have been. Google shows it mentioned here and a similar construct is in the SpeedScript source code. May I ask if it’s the low/high byte notation you found strange or anything else? Come to think of it, if it’s the former it is probably due to my not checking that a pseudo-opcode to store a 2-byte value would work as well (like .WORD START or .DB START).
  4. Not sure if I really understand your concern. Doesn‘t R-TIME8 provide the time at some dedicated memory locations more or less continuously and leaves it to programs using the time how often to read it? As there is no dedicated system clock on the Atari it would seem to make sense to just access those memory locations whenever you need the time rather than updating a separate clock.
  5. I tried to do that once and arrived at a quite accurate correction. My son used to run a 130XE with that routine for months on end as an alarm clock. I did not use the built-in timers at all, however, but implemented my own in a VBI routine. IIRC I calculated how much correction was required per day and calculated after how many jiffies there should be a "leap jiffy" to distribute clock correction evenly over the course of a day. There's counters for jiffies, seconds, minutes, etc. plus a separate counter that is decreased and causes a "leap jiffy" or so every time it hits zero. I found some assembly code but that's most probably work in progress for an improved version never that never got finished. (There's some code in there to display the time, the actual timing code isn't that long.) We should have an Action! version somewhere (with a VBI programmed in Action!). ;ATARI VBLANK CLOCK ;BLUESTONEMC & SLX ;2015-2020 ; ;version 1.8 ; ;most subroutines replaced with inline code ;reset performed using Y register instead of table (saving a whopping byte!) ;correction initializiation routine prepared for PAL/NTSC aware version ; ;System Reset Proof code added ; ;PAL/NTSC detection added ; ;daily correction added ; TESTING SET 1 ; ;System Equates ; VCOUNT = $D40B SYSVBV = $E45F SETVBV = $E45C XITVBV = $E462 DOSINI = $0C ORG $600 ; IN CASE DOS INITS AT FIRST ; BYTE, JUST RTS BACK ; RETURN RTS ; TIMEDATA TENTH .BYTE $00 SECOND .BYTE 55 MINUTE .BYTE 59 HOUR .BYTE 23 DAY .BYTE 28 MONTH .BYTE $02 YEAR .BYTE 20 CENTURY .BYTE 20 OLDYEAR .BYTE $00 COUNTER .BYTE $05 CORRECT .BYTE 103,2 ; ; INIT MONLEN TO ONE LONGER THAN ; LENGTH OF MONTH because it compares after incrementing ; MONLEN .BYTE 32,29,32,31,32,31 .BYTE 32,32,31,32,31,32 RESETVALUE .BYTE 10, 60, 60, 24, 00, 13, 100, 100 ; POP USR ARGUMENT COUNT FROM ; STACK. WILL NOT WORK IF USR() ; IS CALLED WITH PARAMETERS ; BASICSTART PLA ; ; RELOC ROUTINE - JSR to Printer routine acc AA and then examine stack for own address ; ; RELOC via table in located where storage will go later? ; multisegment load tempting (RELOC first, rest at MEMLO? but fails on some DOSes ; ;old initialization code obviated by loading initalized values START LDA DOSINI ;save old DOSINI to JSR in our code STA OLDDOSINI+1 LDA DOSINI+1 STA OLDDOSINI+2 OLDDOSINI JSR DOSINI ;and jump there LDA <OLDDOSINI ;patch own initialization address into DOSINI STA DOSINI LDA >OLDDOSINI STA DOSINI+1 ; ; INSTALL MAIN CLOCK COUNTER LOOP IN IMM VBLANK ; LDX # >PALNTSC LDY # <PALNTSC LDA #6 JSR SETVBV .IF TESTING=1 SCREEN = $BC90 ;display routine for testing SCREENDISPLAY LDA SECOND JSR BYTETODEC ORA #$10 STA SCREEN+20 TXA ORA #$10 STA SCREEN+19 LDA MINUTE JSR BYTETODEC ORA #$10 STA SCREEN+17 TXA ORA #$10 STA SCREEN+16 LDA HOUR JSR BYTETODEC ORA #$10 STA SCREEN+14 TXA ORA #$10 STA SCREEN+13 LDA YEAR JSR BYTETODEC ORA #$10 STA SCREEN+10 TXA ORA #$10 STA SCREEN+9 LDA CENTURY JSR BYTETODEC ORA #$10 STA SCREEN+8 TXA ORA #$10 STA SCREEN+7 LDA MONTH JSR BYTETODEC ORA #$10 STA SCREEN+5 TXA ORA #$10 STA SCREEN+4 LDA DAY JSR BYTETODEC ORA #$10 STA SCREEN+2 TXA ORA #$10 STA SCREEN+1 JMP SCREENDISPLAY BYTETODEC ;REQUIRES BYTE TO BE CONVERTED IN ACC LDX #$FF ; WILL RETURN TENS DIGIT IN X SEC ; AND LOWEST DIGIT IN ACC LOOP.1 INX ; Count Tens up by one SBC #10 ; deduct 10 BPL LOOP.1 ; if still above zero, the last value was above 10, so continue ADC #10 ; if not, put 10 back RTS .ENDIF RTS ; ; AFTER SETVBV WILL RTS TO BASIC (or DOS if called from DOS) ; ; ; DURING EVERY VBLANK CORRECTION ; COUNTER IS REDUCED BY ONE ; ; ;MAINFIRST JSR PALNTSC MAIN DEC CORRECT BNE DECJIFFY ; ; WHEN REACHING ZERO, MSB CORR. ; COUNTER IS REDUCED BY ONE ; DEC CORRECT+1 BNE DECJIFFY ; ; WHEN MSB REACHES ZERO, ; CORRECTION COUNTER IS RESET ; TO START VALUE 358 ; CORRECTLOW LDA #103 STA CORRECT CORRECTHIGH LDA #$02 STA CORRECT+1 ; ; THEREAFTER CORRECTION COUNTER ; COUNTER IS REDUCED BY ONE. ; DEC COUNTER BNE EXIT JSR INCTIME ; ; DURING EVERY VBLANK JIFFY ; COUNTER IS REDUCED BY 1 ; DECJIFFY DEC COUNTER BNE EXIT JSR INCTIME EXIT JMP SYSVBV ; ; IF COUNTER REACHES ZERO, TIME ; INCREASE is performed ; INCTIME LDX #5 ;reset counter to 5 for next 1/10th of a second STX COUNTER LDY #0 ;default reset value for time values ; LDX #0 NEXTVALUE INC TIMEDATA,X CPX #$04 ;check if increasing day BNE CONTCHECK ;if not, continue with standard routine ; ; the following routine checks whether the year has changed since the day was changed the last time ; and performs a check whether the year is a leap year ; this is done here because the day is likely to be adjusted to the actual data after program ; initialisation and the correct length of the month is required now to check whether the month needs ; to be rolled over ; LDA #$07 ;every full day a correction by 35 7/10th of a second is required STA TIMEDATA ;this could be distributed more evenly during the day at the cost ;of more memory usage for the program by alternating a COUNTER ;increase of 1 and 2 for every full hour except midnight ;NTSC value TBD LDA YEAR ;load current year CMP OLDYEAR ;check if year has changed since last cycle (e.g. changed by user) BEQ DOCHECK ;if not, continue normally STA OLDYEAR ;if it has changed, reset OLDYEAR to new value and check for leap year LDY #29 ;set non-leap-year check value for February days AND #$03 ;check if divisible by 4 BNE SAVEMONLEN ;if it isn't, then it is not a leap year and 29 can be saved LDA CENTURY ;it's not a leap year unless the century is divisibly by zero AND #$03 BNE SAVEMONLEN ;if it isn't save 29 as check value for February INY ;if it is, increase to 30 SAVEMONLEN STY MONLEN+1 ;and store directly in table for February DOCHECK LDY MONTH ;load actual month LDA MONLEN-1,Y ;load reset value for actual month CMP TIMEDATA,X ;check if this has been reached BNE EXITINC ;if not, exit LDY #1 ;otherwise load 1 to be stored during reset BNE RESET ;and proceed to reset routine ; ;REMINDER ; ;old algorithm used a 2 counter-decrement every hour for extra correction ;check if still required ; CONTCHECK CPX #6 ;check if year has been reached BNE CONTCHECK1 ;if not, continue DEY ;if yes, change reset value to 0 CONTCHECK1 LDA TIMEDATA,X CMP RESETVALUE,X ;check if value has reached value that requires reset BNE EXITINC RESET TYA ;load resetvalue from Y STA TIMEDATA,X ;store to variable INX ;increase loop counter to next time value CPX #$08 ;check if beyond end of table BNE NEXTVALUE ;if not, continue EXITINC RTS ; ;correction counter is initialized to 358, as counter needs to be corrected every 358 jiffies ;to maintain correct time (as system frequency is not exactly 50 Hz on PAL systems) ; ;for some reason I noted 358 but the actual value is 615, needs to be investigated ; PALNTSC BIT VCOUNT BPL PALNTSC WAIT1 LDA VCOUNT BPL VBOVER TAX BMI WAIT1 VBOVER CPX #$90 LDA #0 ADC #0 BNE DONE LDA #$ED STA CORRECTLOW+1 ;patch correction factor for NTSC into LDA #2 ;correction routine STA CORRECTHIGH+1 LDA #$06 ;in NTSC 1/10th of a second takes 6 VBLANKS STA INCTIME +1 ;so patch counter reset routine accordingly ; ; INSTALL MAIN CLOCK COUNTER LOOP IN IMM VBLANK ; DONE LDX # >MAIN LDY # <MAIN LDA #6 JSR SETVBV JMP SYSVBV ;exit VBLANK ; ; ADD INIT ADDRESS SEGMENT FOR ; BINARY LOAD ; ORG $02E2 .BYTE <START .BYTE >START
  6. Nice classics from the early days (except for the 1025).
  7. I just tried it successfully. You need to use joystick 2 to play Dark. (In Atari800MacX to to Preferences/Controllers and select whatever your input device is from the dropdown menu next to "Joystick 2".
  8. That's a very decent price even for a spray-painted unit. Might have been tempted if I had seen it.
  9. May one inquire what amount of (virtual) money needs to change hands for an adorned JagCD these days?
  10. It’s a board with multiple OS ROM sockets and comes with a modified OS with a monitor that is entered using SELECT or OPTION with System Reset. Most of the document is a description of the monitor which has the usual monitor commands and a TRACE mode.
  11. I also receive the full free and cut-off (teaser) paid posts and an occasional discount offer. It’s not that the topics aren’t interesting, but I don’t have enough time to read the masses of free stuff around. I sometimes write comments which are usually liked even though I’m not a subscriber. Should be safe to support if you feel like it.
  12. Hope my kids feel the same between curses when they wade through my stuff after my final departure… Nice find, what’s the „discwasher“ dongle for?
  13. Interested in a Sophia 2. Thanks!
  14. That's hard to beat style-wise!
×
×
  • Create New...