Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #4805 > unrolled thread
| Started by | Brian Patrie <bpatrie@bellsouth.spamisicky.net> |
|---|---|
| First post | 2018-10-06 09:02 -0500 |
| Last post | 2018-10-11 00:19 -0500 |
| Articles | 10 — 6 participants |
Back to article view | Back to comp.sys.apple2.programmer
Reading the state of VBL on a IIc,IIc+. Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2018-10-06 09:02 -0500
Re: Reading the state of VBL on a IIc,IIc+. Antoine Vignau <antoine.vignau@laposte.net> - 2018-10-06 07:30 -0700
Re: Reading the state of VBL on a IIc,IIc+. "Frank M." <frank_o_rama@hotmail.com> - 2018-10-06 07:43 -0700
Re: Reading the state of VBL on a IIc,IIc+. Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2018-10-07 17:29 -0500
Re: Reading the state of VBL on a IIc,IIc+. Michael J. Mahon <mjmahon@aol.com> - 2018-10-08 15:18 -0500
Re: Reading the state of VBL on a IIc,IIc+. kegs@provalid.com (Kent Dickey) - 2018-10-08 19:32 -0500
Re: Reading the state of VBL on a IIc,IIc+. Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2018-10-09 13:19 -0500
Re: Reading the state of VBL on a IIc,IIc+. Michael J. Mahon <mjmahon@aol.com> - 2018-10-09 15:48 -0500
Re: Reading the state of VBL on a IIc,IIc+. TomCh <tomcharlesworth26@gmail.com> - 2018-10-10 14:32 -0700
Re: Reading the state of VBL on a IIc,IIc+. Michael J. Mahon <mjmahon@aol.com> - 2018-10-11 00:19 -0500
| From | Brian Patrie <bpatrie@bellsouth.spamisicky.net> |
|---|---|
| Date | 2018-10-06 09:02 -0500 |
| Subject | Reading the state of VBL on a IIc,IIc+. |
| Message-ID | <ppaf98$6jt$1@gioia.aioe.org> |
The Apple IIc Technical Reference Second Edition tells me: "Reading $C019 checks the current state of vertical blanking (VBL) on the Apple IIe, but it reads and then resets the vertical blanking interrupt flag in the Apple IIc family." How, then, do we read the state of VBL on a IIc,IIc+? (And, for that matter, WTF did they do this?)
[toc] | [next] | [standalone]
| From | Antoine Vignau <antoine.vignau@laposte.net> |
|---|---|
| Date | 2018-10-06 07:30 -0700 |
| Message-ID | <842aa7ff-7182-4669-a067-8525ae85ebc5@googlegroups.com> |
| In reply to | #4805 |
From French Touch source code.
main.a
;@com.wudsn.ide.asm.hardware=APPLE2
; ACME 0.90
; Crazy Cycles
; Routines Fast Load/Hyper Boot (c) 1986 - SAM/EA
; adaptÈe pour ACME 0.90 - 2014
; version 0.6
!convtab "a2txt.bin" ;
!sl "mainlabel.a"
*= $F100 ; ORG = $F100 (RAM Langage Card)
; PSEUDO CATALOG Track/SectorDebut-Track/SectorFin (inclus)
; T00/S00 : BOOT0
; T00/S01-S09 : MAIN
; T00/S0A-S0F : FLOAD
; T01/S00 - T02/S0F : ROUTINES TRANSITION PART ($9000) - 25 secteurs rÈels
; T03/S00 - T06/S0F : 2 HGRs PART I (PAGES1/2 - $2000/$4000) - 64 (32*2) secteurs rÈels
; T07/S00 - T07/S07 : PART I ($6000) - 8 secteurs rÈels
; T08/S00 - T09/S0F : HGR PART II (PAGE 1 - $2000) - 32 secteurs rÈels
; T0A/S00 - T0C/S0F : PART II ($2000) - 38 secteurs rÈels
; T0D/S00 - T0E/S0F : HGR END (PAGE 2 - $4000) - 32 secteurs rÈels
; T0F/S00 - T0F/S0A : PART III ($6000) - 11 secteurs rÈels
; CONSTANTES SYSTEME ===================
VERTBLANK = $C019 ;
; SOUS-ROUTINES BOOT0
EXECFROMBOOT2 = $857 ; sous routine de dÈtection type APPLE II (utilise ROM)
; SOUS-ROUTINES PROGRAMMES
HYPLOD = $FA00 ; routine Fast Load
TRANSITION1 = $9000 ; routine transition text page 1 (scroll DvG)
TRANSITION2 = $A100 ; routine transition text/hires
WAIT = $A700 ; routine WAIT (y*65 cycles d'attente = 1 ligne)
PARTI = $6000 ; routine anime PART I
PARTII = $4000 ; routine anime PART II
PARTIII = $6000 ; routine anime PART III
; =====================================
;======PARAMETRES DU FAST LOAD
;-PARAMETRES D'ENTREE
PISDEP = $300 ;PISTE DE DEPART
SECDEP = $301 ;SECTEUR DE DEPART
BUFFER = $302 ;ADRESSE OU L'ON CHARGE
TOTSEC = $304 ;TOTAL DES SECTEURS A CHARGER
DRVNUM = $305 ;1 OU 2
ERRMAX = $306 ;MAXIMUM D'ERREURS TOLEREES SUR UN SECTEUR AVANT DE RENDRE LA MAIN
DLFLAG = $307 ;1=DELAI AVANT DE LIRE ;0=NON
;-PARAMETRES ENTREE/SORTIE
ICURTRK1 = $310 ;2*PISTE INITIALE DU DRIVE1 A GARNIR POUR LE 1ER APPEL
ICURTRK2 = $311 ;2*PISTE INITIALE DU DRIVE2 "
; PAGE ZERO ===========================
bIIc = $09 ; byte IIc (00 = //c | other = pas //c !)
bMachine = $0A ; byte MACHINE ($7F/IIE | $FF/GS)
bRefresh = $0B ; byte type NTSC/60Hz - PAL/50Hz (00 = 50HZ | 01 = 60 HZ)
; ***
Temp = $FF
; ======== DEBUT PROGRAMME =========
START
!zone
JMP EXECFROMBOOT2
; ------------------------------------
VBLANK JMP VBLANK_GSE
; ------------------------------------
DEBUT2 ; on revient ici aprËs la routine de dÈtection A2
LDA bIIc
BNE DETECTREFRESH_GSE ; si c'est pas un IIc, on passe directement ‡ la dÈtection du taux de rafraichissement
; si c'est un IIc mise en place de l'interruption !
LDA #<VBLANKIIc ; on fixe la routine d'appel au VBLANK
STA VBLANK+1 ; sur la routine
LDA #>VBLANKIIc ; //c
STA VBLANK+2
sei ; disable interrupts
lda #<VBLI ; on fixe le vecteur de l'interruption
STA $FFFE ; du IIc (VBL)
lda #>VBLI ; pour pointer
STA $FFFF ; sur notre routine VBLI
; on active la premiËre interruption pour VBL
sta $c079 ; enable IOU access
sta $c05b ; enable VBL int
sta $c078 ; disable IOU access
; ============== DETECT REFRESH //c =============
JSR VBLANK ; on attend le dÈbut du VBL
cli ; enable interrupts
; ici dÈbut VBL - depuis quelques cycles dÈj‡
.BP INC COUNTREF ; 6 ; on incrÈmente le compteur
LDX #$09 ;
.WL1 DEX ;
BNE .WL1 ; = 46 cycles
; + 6 + 6 + 4 + 3 = 65 !
NOP
NOP
NOP ; 3*2
; on attend le dÈbut d'un autre VBL (interruption)
bit vblflag ; 4
bpl .BP ; 3 wait for vblflag = 1
lsr vblflag ;...& set vblflag = 0
sei ; interruption off
LDA COUNTREF ; contient un VBL complet + un display et on sort au dÈbut du prochain VBL soit = 192+70+(50) = $138 ou ($106) donc $38 ou $06
CMP #$10 ; >= 16 alors 50 HZ
BCS .GO1
LDA #01 ; 60HZ
JMP .GO2
.GO1 LDA #00 ; 50HZ
.GO2 STA bRefresh
JMP SUITE0
; ========= DETECT REFRESH IIG/IIE ===========
DETECTREFRESH_GSE
!zone
; detection refresh rate (PAL/NTSC)
LDA bMachine ;
.lp1 CMP VERTBLANK
Bpl .lp1 ; on attend la fin du VBL courant
LDA bMachine ; 3
.lp2 CMP VERTBLANK ; 4
Bmi .lp2 ; 2 => on attend la fin du display courant/dÈbut du VBL
; dÈbut VBL
.BP INC COUNTREF ; 6 ; on incrÈmente le compteur
LDX #$09 ;
.WL1 DEX ;
BNE .WL1 ; = 46 cycles
; + 6 + 3 + 3 + 4 + 3 = 65 !
LDA bMachine ; 3
LDA bMachine ; 3
CMP VERTBLANK ; 4
Bpl .BP ; 3 => on boucle tant qu'on est en VBL
LDA COUNTREF
CMP #72 ; >= 72 alors 50 HZ (120*65 cycles de VBL)
BCS .GO3
LDA #01 ; 60HZ (VBL = 70x65 cycles)
JMP .GO4
.GO3 LDA #00 ; 50HZ (VBL = 120x65 cycles)
.GO4 STA bRefresh
; -------------------------------------
SUITE0
; initialisation HyperLoad
LDX #00
STX ICURTRK1
INX ; 1
STX DRVNUM
STX DLFLAG
; affichage texte prÈsentation + logo ascii
JSR VBLANK
; VBL
LDX #39
.bd LDA TextIntro0,x
STA $400,x
STA $750,x
LDA TextIntro1,x
STA $480,x
LDA TextIntro2,x
STA $7D0,x
LDA TextIntro3,x
STA $780,x
LDA TextIntro4,x
STA $428,x
LDA TextIntro5,x
STA $4a8,x
LDA TextIntro6,x
STA $528,x
LDA TextIntro7,x
STA $728,x
LDA TextIntro8,x
STA $7a8,x
LDA TextIntro9,x
STA $450,x
LDA TextIntroA,x
STA $4d0,x
DEX
BPL .bd
; chargement routines transtions en $9000
LDA #00 ; secteur 0
STA SECDEP
STA BUFFER ; buffer low
LDA #01 ; track 1
STA PISDEP ;
LDA #$90 ; buffer high
STA BUFFER+1
LDA #25 ; nb Sectors
STA TOTSEC
JSR HYPLOD ; chargement !
LDX #30 ; environ 3s
JSR WAITIIE
; affichage Presentation Text PART I
LDY #00 ; numero de la PART ‡ afficher (-1)
JSR TRANSITION1 ; appel sous routine
; chargement 2 HGRs PART I + routine
LDA #00 ; secteur 0
STA SECDEP
STA BUFFER ; buffer low
LDA #03 ; track 3
STA PISDEP ;
LDA #$20 ; buffer high
STA BUFFER+1
LDA #(32+32+8) ; nb Sectors (2 HGRs + routine)
STA TOTSEC
JSR HYPLOD ; chargement !
STA $C010 ; strobe
LDX #20 ; environ 2s
JSR WAITIIE
; Transition TEXT/HIRES
JSR TRANSITION2 ; appel sous routine
; ATTENTION, ON REVIENT SYNCHRONISE
JSR PARTI ; appel sous routine PART I
; on revient desynchro
LDA $C051 ; mode texte / page 1
STA $C010 ; strobe
; affichage Presentation Text PART II
LDY #01 ; numero de la PART ‡ afficher (-1)
JSR TRANSITION1 ; appel sous routine
; TEXT2TO1 ; ; on copie la page vers $800 (sauvegarde avant Ècrasement par PART II)
LDX #$04
LDY #00
.B1
.off1 LDA $400,Y
.off2 STA $800,Y
INY
BNE .B1
INC .off1+2
INC .off2+2
DEX
BNE .B1
; chargement HGR PART II + routine PART II
LDA #00 ; secteur 0
STA SECDEP
STA BUFFER ; buffer low
LDA #08 ; track 8
STA PISDEP ;
LDA #$20 ; buffer high
STA BUFFER+1
LDA #32+39 ; nb Sectors (1 HGR + routine)
STA TOTSEC
JSR HYPLOD ; chargement !
; dÈtection 6502
LDA bMachine
BMI .suiteGS ; on a un GS donc on s'occupe pas du 6502
LDA bIIc
BEQ .suiteIIc ; on a un IIc on s'occupe pas du 6502
!byte $80,$03 ; BRA +3 si 65C02 ou DOP si 6502
JMP .suite6502 ; si le BRA passe par dessus, on a un 65C02, sinon le DOP nous amËne au JMP
JMP .suite65C02 ; on passe au dessus
; si on est ici, on a un 6502
.suite6502
LDX #39
.boucleText
LDA Text65C021,X
STA $650,X
LDA Text65C022,X
STA $6D0,X
DEX
BPL .boucleText
LDX #20 ; on rajoute 2 secondes d'attente environ
JSR WAITIIE
.suiteIIc
.suiteGS
.suite65C02
LDX #20 ; environ 2s
JSR WAITIIE
; Transition TEXT/HIRES
JSR TRANSITION2 ; appel sous routine
; ATTENTION, ON REVIENT SYNCHRONISE
JSR PARTII
; retour desynchro
STA $C010
LDA $C050 ; on reste en mode graphique le temps de rÈafficher l'ecran TEXT (qui aura ÈtÈ effacer pendant la partie II)
LDA $C057 ; hires
; TEXT2TO1 ; on recopie la page qui avait ÈtÈ sauvÈe en $800
LDX #$04
LDY #00
.B2
.off3 LDA $800,Y
.off4 STA $400,Y
INY
BNE .B2
INC .off3+2
INC .off4+2
DEX
BNE .B2
LDA $C051 ; on repasse en mode text
; affichage Presentation Text PART III
LDY #02 ; numero de la PART ‡ afficher (-1)
JSR TRANSITION1 ; appel sous routine
; chargement routine HGR END + PART III
LDA #00 ; secteur 0
STA SECDEP
STA BUFFER ; buffer low
LDA #$0D ; track
STA PISDEP ;
LDA #$40 ; buffer high
STA BUFFER+1
LDA #32+11 ; nb Sectors (routine)
STA TOTSEC
JSR HYPLOD ; chargement !
; effacement HIRES 1
LDX #$20
LDA #$00
TAY
.B3
.off5 STA $2000,Y
INY
BNE .B3
INC .off5+2
DEX
BNE .B3
; ------------------
; prÈparation TEXT
LDX #39
.boucle1
LDA Title1,X
STA $800,X
LDA Title2,X
STA $880,X
LDA Title3,X
STA $900,X
LDA Title4,X
STA $980,X
LDA Title5,X
STA $A00,X
LDA Title6,X
STA $A80,X
LDA Title7,X
STA $B00,X
LDA Title8,X
STA $B80,X
DEX
BPL .boucle1
; ---------------------------------------------
; Remplissage lignes Text 1 pour anim cycling
LDX #39
LDA #$AA
.boucle2
STA $928,X
STA $9A8,X
STA $A28,X
STA $AA8,X
STA $B28,X
STA $BA8,X
STA $850,X
STA $8D0,X
STA $950,X
STA $9D0,X
STA $A50,X
STA $AD0,X
DEX
BPL .boucle2
; + effacement des autres lignes
LDX #39
LDA #$A0
.boucle3
STA $828,X
STA $8A8,X
STA $B50,X
DEX
BPL .boucle3
; prÈparation derniËre ligne
LDX #39
.boucle4
LDA Text1,X
STA $BD0,X
DEX
BPL .boucle4
; ----------------------------------------------
LDX #10 ; environ 1s
JSR WAITIIE
JSR TRANSITION2 ; appel sous routine
; on perd la synchro (tant pis)
; TEXT2TO1 ; on recopie la page qui avait ÈtÈ Ècrite en $800
LDX #$04
LDY #00
.B4
.off6 LDA $800,Y
.off7 STA $400,Y
INY
BNE .B4
INC .off6+2
INC .off7+2
DEX
BNE .B4
LDA $C051 ; affichage text
JSR PARTIII ; non synchro ici (on chopera la synchro dans la PART III)
STA $C010
LDA $C057
LDA $C050
LDA $C055
LDX #20 ; environ 2s
JSR WAITIIE
LDA #$8D
STA $300
LDA #$82
STA $301
LDA #$C0
STA $302
LDA #$4C
STA $303
LDA #00
STA $304
LDA #$C6
STA $305
JMP $300 ; reboot !
; =============================================================================
WAITIIE ; d'aprËs la routine ROM Apple IIe (6502) - X * 0.1seconde environ
!zone
.s3
LDA #198
SEC
.s2 PHA
.s1 SBC #$01
BNE .s1
PLA
SBC #$01
BNE .s2
DEX
BNE .s3
RTS
; =====================================================================================================================
VBLI ; routine executÈ lors de l'interruption VBL de la Mouse Rom d'un IIc
!zone
; on rÈactive l'interruption
sta $c079 ; enable IOU access
sta $c05b ; enable VBL int
sta $c078 ; disable IOU access
; on fixe le flag
LDA #$80
STA vblflag ; set hibit
RTI
; =============================================================================
VBLANKIIc ; code from Prince Of Persia Source (Jordan Mechner - 1989)
!zone
cli ; enable interrupts
.l1 bit vblflag
bpl .l1 ; wait for vblflag = 1
lsr vblflag ;...& set vblflag = 0
sei
rts
; =============================================================================
VBLANK_GSE
LDA bMachine
.LVBL1 CMP VERTBLANK
BPL .LVBL1 ; attend fin vbl
LDA bMachine
.LVBL2 CMP VERTBLANK
BMI .LVBL2 ; attend fin display
RTS
; =============================================================================
; =============================================================================
COUNTREF !byte 0
vblflag !byte 0
; =============================================================================
TextIntro0 !fill 40,$DF ;"_' inverse
!convtab "a2txti.bin" {
; .................0000000000111111111122222222223333333333
; .................0123456789012345678901234567890123456789
TextIntro1 !Text " FRENCH TOUCH PRESENTS "
TextIntro2 !Text "c MINI DEMO IV c"
}
; .................0000000000111111111122222222223333333333
; .................0123456789012345678901234567890123456789
TextIntro3 !Text " .---. .----. .--. .---..-. .-. "
TextIntro4 !Text " / ___)| () ) / () \(_ / \ \/ / "
TextIntro5 !Text " \ )| .-. \/ /\ \/ ) ) ( "
TextIntro6 !Text " `---' `-' `-'`-' `-'`---' `--' "
TextIntro7 !Text " .---..-. .-..---. .-. .----. .----. "
TextIntro8 !Text "/ ___)\ \/ // ___)| | | (_ ( (___ "
TextIntro9 !Text "\ ) ) ( \ )| `--.| (__ .-._) ) "
TextIntroA !Text " `---' `--' `---' `----'`----'`----' "
;.............0000000000111111111122222222223333333333
;.............0123456789012345678901234567890123456789
Title1 !text " _____ _____ _____ _____ __ __ "
Title2 !text "| | __ | _ |__ | | | "
Title3 !text "| --| -| | __|_ _| "
Title4 !text "|_____|__|__|__|__|_____| |_| "
Title5 !text " _____ __ __ _____ __ _____ _____ "
Title6 !text " | | | | | | | __| __|"
!align 255,0
Title7 !text " | --|_ _| --| |__| __|__ |"
Title8 !text " |_____| |_| |_____|_____|_____|_____|"
;.............0000000000111111111122222222223333333333
;.............0123456789012345678901234567890123456789
Text1 !text "JUST A RANDOM SCROLL TEXT (HEY, HAVE YOU"
;................0123456789012345678901234567890123456789
Text65C021 !text" WARNING: 6502 DETECTED "
Text65C022 !text" Display won't be correct for this PART "
========================
mainlabel.a:
DETECTREFRESH_GSE =$f153; ?
bRefresh =$b
vblflag =$f3f1; ?
COUNTREF =$f3f0; ?
Temp =$ff; unused
EXECFROMBOOT2 =$857
Title3 =$f5fa; ?
Title2 =$f5d2; ?
Title1 =$f5aa; ?
VBLANK =$f103
PARTII =$4000
Title7 =$f700; ?
Title6 =$f672; ?
TextIntroA =$f582; ?
Title5 =$f64a; ?
Title4 =$f622; ?
Title8 =$f728; ?
HYPLOD =$fa00
VBLI =$f3c7; ?
SECDEP =$301
WAIT =$a700; unused
TRANSITION2 =$a100
TRANSITION1 =$9000
TextIntro7 =$f50a; ?
TextIntro6 =$f4e2; ?
TextIntro5 =$f4ba; ?
TextIntro4 =$f492; ?
TextIntro3 =$f46a; ?
TextIntro2 =$f442; ?
TextIntro1 =$f41a; ?
TextIntro0 =$f3f2; ?
PARTIII =$6000
TextIntro9 =$f55a; ?
TextIntro8 =$f532; ?
SUITE0 =$f182; ?
DEBUT2 =$f106; unused
START =$f100; unused
ICURTRK2 =$311; unused
ICURTRK1 =$310
PISDEP =$300
VERTBLANK =$c019
DRVNUM =$305
Text65C021 =$f778; ?
Text65C022 =$f7a0; ?
bMachine =$a
bIIc =$9
PARTI =$6000
DLFLAG =$307
VBLANK_GSE =$f3e1; ?
TOTSEC =$304
BUFFER =$302
ERRMAX =$306; unused
VBLANKIIc =$f3d6; ?
WAITIIE =$f3b6; ?
Text1 =$f750; ?
=== end of transmission
[toc] | [prev] | [next] | [standalone]
| From | "Frank M." <frank_o_rama@hotmail.com> |
|---|---|
| Date | 2018-10-06 07:43 -0700 |
| Message-ID | <be1e6f27-e1e7-46a1-94b7-26bbe9d95461@googlegroups.com> |
| In reply to | #4805 |
Some code from Cybernesto... https://github.com/cybernesto/F15-DGamma-Clone-A2/commit/488d53094e06c54e1308cb94b34e9d3d02022166
[toc] | [prev] | [next] | [standalone]
| From | Brian Patrie <bpatrie@bellsouth.spamisicky.net> |
|---|---|
| Date | 2018-10-07 17:29 -0500 |
| Message-ID | <ppe1cv$7uc$1@gioia.aioe.org> |
| In reply to | #4807 |
Thanks, Antoine, and Frank. (FWIW, my main use-case is pacing a timeout in a key input subroutine.)
[toc] | [prev] | [next] | [standalone]
| From | Michael J. Mahon <mjmahon@aol.com> |
|---|---|
| Date | 2018-10-08 15:18 -0500 |
| Message-ID | <QMedneZR6bUQJibGnZ2dnUU7-XnNnZ2d@giganews.com> |
| In reply to | #4808 |
Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: > Thanks, Antoine, and Frank. > > (FWIW, my main use-case is pacing a timeout in a key input subroutine.) > This reminds me of a discussion I had several years ago, when I was building the graphical interface for a 4x4x4 3D Tic-Tac-Toe game. The game code was pretty processor intensive, and so would benefit from a Zip Chip-style speedup, but the animations were for user interaction, so I wanted the video to run at standard speed (as occurs with any Apple II accelerator). Since I anticipated that the game would often be played on an emulator, I asked whether any emulators with acceleration kept the video speeds standard. At the time, I was told that emulator acceleration was “across the board”, and that nothing equivalent to a hardware A2 accelerator was provided. Needless to say, that precluded any “real time” (as opposed to accelerated) animation. It seems that your desire to use VBL sensing for a “real time” timeout might run afoul of the same problem if run under accelerated emulation. I still think it would be a great idea for emulators to provide a Zip-style processor acceleration in addition to the usual “everything speeds up” modes. -- -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
[toc] | [prev] | [next] | [standalone]
| From | kegs@provalid.com (Kent Dickey) |
|---|---|
| Date | 2018-10-08 19:32 -0500 |
| Message-ID | <FKmdnY6-9JuDaibGnZ2dnUU7-TnNnZ2d@giganews.com> |
| In reply to | #4811 |
In article <QMedneZR6bUQJibGnZ2dnUU7-XnNnZ2d@giganews.com>, Michael J. Mahon <mjmahon@aol.com> wrote: >Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: >> Thanks, Antoine, and Frank. >> >> (FWIW, my main use-case is pacing a timeout in a key input subroutine.) >> > >This reminds me of a discussion I had several years ago, when I was >building the graphical interface for a 4x4x4 3D Tic-Tac-Toe game. > >The game code was pretty processor intensive, and so would benefit from a >Zip Chip-style speedup, but the animations were for user interaction, so I >wanted the video to run at standard speed (as occurs with any Apple II >accelerator). > >Since I anticipated that the game would often be played on an emulator, I >asked whether any emulators with acceleration kept the video speeds >standard. > >At the time, I was told that emulator acceleration was “across the board”, >and that nothing equivalent to a hardware A2 accelerator was provided. >Needless to say, that precluded any “real time” (as opposed to accelerated) >animation. I don't know how other emulators work, but KEGS (and I would guess its descendants, but I've not investigated them much) maintains VBL at 60 Hz real time at all times. KEGS also knows writes to "slow memory" only happen at 1MHz. Basically, KEGS works like a very fast ZIP GS. KEGS cheats a little-- writes to shadow ram are not slowed down, so that BASIC programs can run full speed even when their variables are on the hires page. I should probably make this an option that can be turned on and off. It is a compile option. However, I've noticed many animations get confused when run at KEGS at 200MHz+. The Apple II code just wasn't expecting to handle that much speed, and so they don't handle it right. I'm not surprised code doesn't work right when it reads the line counter, updates the entire screen, and finds it's still on the same video line. KEGS biggest problem is it's user hostile, I'm going to try to do something about that. >It seems that your desire to use VBL sensing for a “real time” timeout >might run afoul of the same problem if run under accelerated emulation. > >I still think it would be a great idea for emulators to provide a Zip-style >processor acceleration in addition to the usual “everything speeds up” >modes. > >-- >-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com Kent
[toc] | [prev] | [next] | [standalone]
| From | Brian Patrie <bpatrie@bellsouth.spamisicky.net> |
|---|---|
| Date | 2018-10-09 13:19 -0500 |
| Message-ID | <ppirfv$4ca$1@gioia.aioe.org> |
| In reply to | #4811 |
On 2018-10-08 15:18, Michael J. Mahon wrote: > Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: >> Thanks, Antoine, and Frank. >> >> (FWIW, my main use-case is pacing a timeout in a key input subroutine.) >> > > This reminds me of a discussion I had several years ago, when I was > building the graphical interface for a 4x4x4 3D Tic-Tac-Toe game. > > The game code was pretty processor intensive, and so would benefit from a > Zip Chip-style speedup, but the animations were for user interaction, so I > wanted the video to run at standard speed (as occurs with any Apple II > accelerator). > > Since I anticipated that the game would often be played on an emulator, I > asked whether any emulators with acceleration kept the video speeds > standard. > > At the time, I was told that emulator acceleration was “across the board”, > and that nothing equivalent to a hardware A2 accelerator was provided. > Needless to say, that precluded any “real time” (as opposed to accelerated) > animation. > > It seems that your desire to use VBL sensing for a “real time” timeout > might run afoul of the same problem if run under accelerated emulation. > > I still think it would be a great idea for emulators to provide a Zip-style > processor acceleration in addition to the usual “everything speeds up” > modes. As Kent says in another reply, KEGS and its descendants do. AppleWin, does not (which can be good or bad, depending upon the needs of the moment).
[toc] | [prev] | [next] | [standalone]
| From | Michael J. Mahon <mjmahon@aol.com> |
|---|---|
| Date | 2018-10-09 15:48 -0500 |
| Message-ID | <zP-dnS8Or4WBiSDGnZ2dnUU7-LnNnZ2d@giganews.com> |
| In reply to | #4816 |
Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: > On 2018-10-08 15:18, Michael J. Mahon wrote: >> Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: >>> Thanks, Antoine, and Frank. >>> >>> (FWIW, my main use-case is pacing a timeout in a key input subroutine.) >>> >> >> This reminds me of a discussion I had several years ago, when I was >> building the graphical interface for a 4x4x4 3D Tic-Tac-Toe game. >> >> The game code was pretty processor intensive, and so would benefit from a >> Zip Chip-style speedup, but the animations were for user interaction, so I >> wanted the video to run at standard speed (as occurs with any Apple II >> accelerator). >> >> Since I anticipated that the game would often be played on an emulator, I >> asked whether any emulators with acceleration kept the video speeds >> standard. >> >> At the time, I was told that emulator acceleration was “across the board”, >> and that nothing equivalent to a hardware A2 accelerator was provided. >> Needless to say, that precluded any “real time” (as opposed to accelerated) >> animation. >> >> It seems that your desire to use VBL sensing for a “real time” timeout >> might run afoul of the same problem if run under accelerated emulation. >> >> I still think it would be a great idea for emulators to provide a Zip-style >> processor acceleration in addition to the usual “everything speeds up” >> modes. > > As Kent says in another reply, KEGS and its descendants do. AppleWin, > does not (which can be good or bad, depending upon the needs of the moment). > Both “modes” have their uses. Ideally, the behavior would be an option. ;-) -- -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
[toc] | [prev] | [next] | [standalone]
| From | TomCh <tomcharlesworth26@gmail.com> |
|---|---|
| Date | 2018-10-10 14:32 -0700 |
| Message-ID | <6e6bef00-6077-4e1b-8b76-a2c8838b2fba@googlegroups.com> |
| In reply to | #4817 |
On Tuesday, October 9, 2018 at 9:48:34 PM UTC+1, mjm...@aol.com wrote: > Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: > > On 2018-10-08 15:18, Michael J. Mahon wrote: > >> Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: > >>> Thanks, Antoine, and Frank. > >>> > >>> (FWIW, my main use-case is pacing a timeout in a key input subroutine.) > >>> > >> > >> This reminds me of a discussion I had several years ago, when I was > >> building the graphical interface for a 4x4x4 3D Tic-Tac-Toe game. > >> > >> The game code was pretty processor intensive, and so would benefit from a > >> Zip Chip-style speedup, but the animations were for user interaction, so I > >> wanted the video to run at standard speed (as occurs with any Apple II > >> accelerator). > >> > >> Since I anticipated that the game would often be played on an emulator, I > >> asked whether any emulators with acceleration kept the video speeds > >> standard. > >> > >> At the time, I was told that emulator acceleration was “across the board”, > >> and that nothing equivalent to a hardware A2 accelerator was provided. > >> Needless to say, that precluded any “real time” (as opposed to accelerated) > >> animation. > >> > >> It seems that your desire to use VBL sensing for a “real time” timeout > >> might run afoul of the same problem if run under accelerated emulation. > >> > >> I still think it would be a great idea for emulators to provide a Zip-style > >> processor acceleration in addition to the usual “everything speeds up” > >> modes. > > > > As Kent says in another reply, KEGS and its descendants do. AppleWin, > > does not (which can be good or bad, depending upon the needs of the moment). > > > > Both “modes” have their uses. Ideally, the behavior would be an option. ;-) > > -- > -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com Hi Michael, ...OK, added as a feature request: https://github.com/AppleWin/AppleWin/issues/588 Tom
[toc] | [prev] | [next] | [standalone]
| From | Michael J. Mahon <mjmahon@aol.com> |
|---|---|
| Date | 2018-10-11 00:19 -0500 |
| Message-ID | <EradnagPfLj0QCPGnZ2dnUU7-YvNnZ2d@giganews.com> |
| In reply to | #4822 |
TomCh <tomcharlesworth26@gmail.com> wrote: > On Tuesday, October 9, 2018 at 9:48:34 PM UTC+1, mjm...@aol.com wrote: >> Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: >>> On 2018-10-08 15:18, Michael J. Mahon wrote: >>>> Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote: >>>>> Thanks, Antoine, and Frank. >>>>> >>>>> (FWIW, my main use-case is pacing a timeout in a key input subroutine.) >>>>> >>>> >>>> This reminds me of a discussion I had several years ago, when I was >>>> building the graphical interface for a 4x4x4 3D Tic-Tac-Toe game. >>>> >>>> The game code was pretty processor intensive, and so would benefit from a >>>> Zip Chip-style speedup, but the animations were for user interaction, so I >>>> wanted the video to run at standard speed (as occurs with any Apple II >>>> accelerator). >>>> >>>> Since I anticipated that the game would often be played on an emulator, I >>>> asked whether any emulators with acceleration kept the video speeds >>>> standard. >>>> >>>> At the time, I was told that emulator acceleration was “across the board”, >>>> and that nothing equivalent to a hardware A2 accelerator was provided. >>>> Needless to say, that precluded any “real time” (as opposed to accelerated) >>>> animation. >>>> >>>> It seems that your desire to use VBL sensing for a “real time” timeout >>>> might run afoul of the same problem if run under accelerated emulation. >>>> >>>> I still think it would be a great idea for emulators to provide a Zip-style >>>> processor acceleration in addition to the usual “everything speeds up” >>>> modes. >>> >>> As Kent says in another reply, KEGS and its descendants do. AppleWin, >>> does not (which can be good or bad, depending upon the needs of the moment). >>> >> >> Both “modes” have their uses. Ideally, the behavior would be an option. ;-) >> >> -- >> -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com > > Hi Michael, > > ...OK, added as a feature request: > https://github.com/AppleWin/AppleWin/issues/588 > > Tom > Thanks, Tom! It would be nice to have the animated intro run at “human” speed for clarity. ;-) -- -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.apple2.programmer
csiph-web