mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-06-06 22:29:32 +00:00
Compare commits
52 Commits
v0.51-beta
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
fb180a625c | ||
|
6b6c5ec95a | ||
|
2b257d95c5 | ||
|
189d6ff9e1 | ||
|
72f6b794c5 | ||
|
807c1db74b | ||
|
d923d07cce | ||
|
68c6293e38 | ||
|
01fbd66c79 | ||
|
bfc5ac7e71 | ||
|
ca507c3ae0 | ||
|
056bf98715 | ||
|
88425758b5 | ||
|
919da45100 | ||
|
eb03fac973 | ||
|
699c6ed83a | ||
|
d1ad501f02 | ||
|
379fc35240 | ||
|
bf37cc7b9f | ||
|
fab0c1c1c3 | ||
|
de40e76fc7 | ||
|
9086c0a501 | ||
|
89d2feaa4d | ||
|
1fc6c32cb4 | ||
|
ce338dabb0 | ||
|
1113a55ce9 | ||
|
216a1cbd21 | ||
|
8d756963f9 | ||
|
da412d6b8a | ||
|
0e36d483be | ||
|
6739f65d7f | ||
|
d3f3d2e267 | ||
|
34ed8b02ca | ||
|
7d58b3aa6a | ||
|
4174fe86ee | ||
|
5ecf53b3ba | ||
|
6906a0d90e | ||
|
a6c5479985 | ||
|
d2090e24f5 | ||
|
f197d427ba | ||
|
3325769e5f | ||
|
da3e1272b8 | ||
|
52115342e3 | ||
|
88c40b3d1c | ||
|
c7d39ee8c6 | ||
|
3f2a5d6b90 | ||
|
f7bb479ec9 | ||
|
f9c799017d | ||
|
24669a7ce0 | ||
|
93588a6a8d | ||
|
6016c59eeb | ||
|
7fa3e66712 |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
auxmem.vers.s
|
BIN
Releases/applecorn-0.52-beta.po
Normal file
BIN
Releases/applecorn-0.52-beta.po
Normal file
Binary file not shown.
BIN
Releases/applecorn-0.53-beta.po
Normal file
BIN
Releases/applecorn-0.53-beta.po
Normal file
Binary file not shown.
BIN
Releases/applecorn-0.54-beta.po
Normal file
BIN
Releases/applecorn-0.54-beta.po
Normal file
Binary file not shown.
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
74
auxmem.shr.s
74
auxmem.shr.s
|
@ -119,70 +119,25 @@ SHRPRCHAR LDX VDUPIXELS ; Pixels per byte
|
|||
* VS read cursor / VC write cursor
|
||||
* The read and write cursors have separate save-unders in :SAVEBYTES
|
||||
SHRCURSOR PHP ; Preserve flags
|
||||
PHA ; Preserve character
|
||||
PHA ; Preserve A
|
||||
LDA VDUSTATUS ; If VDU5 mode, bail
|
||||
AND #$20
|
||||
BNE :BAIL
|
||||
LDA VDUPIXELS ; Pixels per byte
|
||||
CMP #$02 ; 2 is 320-mode (MODE 1)
|
||||
BNE :MODE0
|
||||
LDA #$04 ; 4 bytes in 320 mode
|
||||
LDX #$71 ; White/red
|
||||
BRA :S1
|
||||
:MODE0 LDA #$02 ; 2 bytes in 640 mode
|
||||
LDX #%11011101 ; White/red/white/red
|
||||
:S1 STA :BYTES ; Bytes per char
|
||||
STX :CURSBYTE
|
||||
LDA #$E1
|
||||
STA VDUBANK2
|
||||
BNE SHRCURSBAIL
|
||||
JSR SHRCHARADDR ; Screen addr in VDUADDR
|
||||
LDA VDUADDR+0 ; LSB
|
||||
CLC
|
||||
ADC #<$460 ; $460 is seven rows
|
||||
STA VDUADDR+0
|
||||
LDA VDUADDR+1 ; MSB
|
||||
ADC #>$460 ; $460 is seven rows
|
||||
STA VDUADDR+1
|
||||
LDY #$00
|
||||
LDX #$00
|
||||
PLA ; Recover character
|
||||
PLP ; Recover flags
|
||||
BVC :S2 ; VC: Write cursor
|
||||
INX ; Advance to 2nd half of :SAVEBYTES
|
||||
INX
|
||||
INX
|
||||
INX
|
||||
:S2 BCC :CURSOROFF ; CC: Remove cursor
|
||||
:CURSORON
|
||||
LDA [VDUADDR],Y ; See if cursor shown
|
||||
CMP :CURSBYTE
|
||||
BEQ :DONE ; Cursor shown already, skip
|
||||
:L1 LDAL [VDUADDR],Y
|
||||
STA :SAVEBYTES,X ; Preserve bytes under cursor
|
||||
LDA :CURSBYTE ; Byte of cursor data
|
||||
STAL [VDUADDR],Y
|
||||
INX
|
||||
INY
|
||||
CPY :BYTES
|
||||
BNE :L1
|
||||
>>> WRTMAIN
|
||||
LDA VDUADDR+0 ; Copy addr to SHRVDUQ
|
||||
STA SHRVDUQ+0
|
||||
LDA VDUADDR+1
|
||||
STA SHRVDUQ+1
|
||||
>>> WRTAUX
|
||||
PLA ; Recover A
|
||||
PLY ; Flags -> Y
|
||||
>>> XF2MAIN,SHRCURSM
|
||||
SHRCURSRET >>> ENTAUX
|
||||
RTS
|
||||
:CURSOROFF
|
||||
LDA [VDUADDR],Y ; See if cursor shown
|
||||
CMP :CURSBYTE
|
||||
BNE :DONE ; Cursor not shown, skip
|
||||
:L2 LDA :SAVEBYTES,X ; Restore bytes under cursor
|
||||
STAL [VDUADDR],Y
|
||||
INX
|
||||
INY
|
||||
CPY :BYTES
|
||||
BNE :L2
|
||||
:DONE RTS
|
||||
:BAIL PLA ; Fix stack
|
||||
PLA
|
||||
SHRCURSBAIL PLA
|
||||
PLP
|
||||
RTS
|
||||
:BYTES DB $00 ; 2 for 640-mode, 4 for 320-mode
|
||||
:CURSBYTE DB $00 ; Cursor byte for mode
|
||||
:SAVEBYTES DS 8 ; Bytes under cursors
|
||||
|
||||
|
||||
* Write character to SHR screen in 320 pixel mode
|
||||
|
@ -689,6 +644,7 @@ SHRSETGCOL PHA
|
|||
>>> WRTAUX
|
||||
RTS
|
||||
|
||||
|
||||
* Wrapper to call SHRDEFPALM (which sets up default palette)
|
||||
SHRDEFPAL >>> XF2MAIN,SHRDEFPALM
|
||||
SHRDEFPALRET >>> ENTAUX
|
||||
|
|
43
auxmem.vdu.s
43
auxmem.vdu.s
|
@ -112,16 +112,18 @@ VDUWORKSZ EQU VDUVAREND-VDUWORKSP+1
|
|||
*
|
||||
|
||||
* Screen definitions
|
||||
* 0 1 2 3 6 7 ; MODEs sort-of completed
|
||||
* 0 1 3 4 6 7 ; MODEs sort-of completed
|
||||
SCNTXTMAXX DB 79, 39, 39, 79, 39, 39, 39, 39 ; Max text column
|
||||
SCNTXTMAXY DB 23, 23, 23, 23, 23, 23, 23, 23 ; Max text row
|
||||
SCNBYTES DB 08, 08, 08, 01, 01, 01, 01, 01 ; Bytes per character
|
||||
SCNCOLOURS DB 03, 15, 07, 01, 01, 01, 01, 01 ; Colours-1
|
||||
SCNPIXELS DB 04, 02, 07, 00, 00, 00, 00, 00 ; Pixels per byte
|
||||
SCNTYPE DB 65, 64,128, 01, 00, 00, 00, 32 ; Screen type
|
||||
SCNBYTES DB 08, 08, 08, 01, 08, 01, 01, 01 ; Bytes per character
|
||||
SCNCOLOURS DB 03, 15, 15, 01, 07, 01, 01, 01 ; Colours-1
|
||||
SCNPIXELS DB 04, 02, 02, 00, 07, 00, 00, 00 ; Pixels per byte
|
||||
SCNFALLBACK DB 03, 04, 05, 03, 04, 05, 06, 07 ; Fall back if unsupported
|
||||
SCNTYPE DB 65, 64, 66, 01,128, 02, 00, 32 ; Screen type
|
||||
* b7=FastDraw -> HGR mode
|
||||
* b6=SHR mode on Apple IIgs
|
||||
* b5=Teletext
|
||||
* b1=40COL/20COL
|
||||
* b0=40COL/80COL
|
||||
|
||||
* Colour table
|
||||
|
@ -704,15 +706,16 @@ VDUINIT STA VDUQ+8
|
|||
* MODEs available:
|
||||
* MODE 0 - 640x200 SHR graphics, 80x24 bitmap text (GS only)
|
||||
* MODE 1 - 320x200 SHR graphics, 40x24 bitmap text (GS only)
|
||||
* MODE 2 - 280x192 HGR graphics, 40x24 bitmap text
|
||||
* MODE 2 --> MODE 1
|
||||
* MODE 3 - 80x24 text
|
||||
* MODE 4 --> MODE 6
|
||||
* MODE 4 - 280x192 HGR graphics, 40x24 bitmap text
|
||||
* MODE 5 --> MODE 6
|
||||
* MODE 6 - 40x24 text
|
||||
* MODE 7 - 40x24 with $80-$9F converted to spaces
|
||||
*
|
||||
* On //e, MODE 0 -> MODE 3
|
||||
* MODE 1 -> MODE 6
|
||||
* MODE 1 -> MODE 4
|
||||
* MODE 2 -> MODE 5
|
||||
*
|
||||
VDU22 JSR NEGCALL ; Find machine type
|
||||
AND #$0F
|
||||
|
@ -721,16 +724,22 @@ VDU22 JSR NEGCALL ; Find machine type
|
|||
:NOTGS STA VDUBANK
|
||||
LDA VDUQ+8
|
||||
AND #$07
|
||||
|
||||
; jgh
|
||||
BIT VDUBANK
|
||||
BMI :INIT ; Skip if GS
|
||||
CMP #$00 ; Mode 0?
|
||||
BNE :S1
|
||||
LDA #$03 ; --> Mode 3 instead
|
||||
BRA :INIT
|
||||
:S1 CMP #$01 ; Mode 1?
|
||||
BNE :INIT
|
||||
LDA #$06 ; --> Mode 6 instead
|
||||
BMI :INIT ; All MODEs supported
|
||||
CMP #$03
|
||||
BCS :INIT
|
||||
ADC #$03 ; Fall back to replacement MODE
|
||||
|
||||
; BIT VDUBANK
|
||||
; BMI :INIT ; Skip if GS
|
||||
; CMP #$00 ; Mode 0?
|
||||
; BNE :S1
|
||||
; LDA #$03 ; --> Mode 3 instead
|
||||
; BRA :INIT
|
||||
;:S1 CMP #$01 ; Mode 1?
|
||||
; BNE :INIT
|
||||
; LDA #$06 ; --> Mode 6 instead
|
||||
|
||||
:INIT TAX ; Set up MODE
|
||||
STX VDUMODE ; Screen MODE
|
||||
|
|
3
auxmem.vers.s
Normal file
3
auxmem.vers.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
* Auto-generated by .git/hooks/pre-commit
|
||||
HELLO ASC 'Applecorn v0.54-beta-0-g3325769'
|
||||
DB $00
|
BIN
demos/ClockSp
Normal file
BIN
demos/ClockSp
Normal file
Binary file not shown.
Binary file not shown.
BIN
demos/graphics/Circle
Normal file
BIN
demos/graphics/Circle
Normal file
Binary file not shown.
BIN
demos/graphics/CircleINT
Normal file
BIN
demos/graphics/CircleINT
Normal file
Binary file not shown.
BIN
demos/graphics/Clipping
Normal file
BIN
demos/graphics/Clipping
Normal file
Binary file not shown.
BIN
demos/graphics/CreativeGraphics.po
Normal file
BIN
demos/graphics/CreativeGraphics.po
Normal file
Binary file not shown.
BIN
demos/graphics/Ellipse
Normal file
BIN
demos/graphics/Ellipse
Normal file
Binary file not shown.
BIN
demos/graphics/GCOLs
Normal file
BIN
demos/graphics/GCOLs
Normal file
Binary file not shown.
BIN
demos/graphics/Graphics
Normal file
BIN
demos/graphics/Graphics
Normal file
Binary file not shown.
BIN
demos/graphics/Pixels
Normal file
BIN
demos/graphics/Pixels
Normal file
Binary file not shown.
BIN
demos/graphics/Spiral
Normal file
BIN
demos/graphics/Spiral
Normal file
Binary file not shown.
BIN
demos/kbd/KBDTest
Normal file
BIN
demos/kbd/KBDTest
Normal file
Binary file not shown.
BIN
demos/misc/8Queens
Normal file
BIN
demos/misc/8Queens
Normal file
Binary file not shown.
BIN
demos/misc/Tiny65
Normal file
BIN
demos/misc/Tiny65
Normal file
Binary file not shown.
BIN
demos/vdu/Chars
Normal file
BIN
demos/vdu/Chars
Normal file
Binary file not shown.
BIN
demos/vdu/ColourGrid
Normal file
BIN
demos/vdu/ColourGrid
Normal file
Binary file not shown.
BIN
demos/vdu/Colours
Normal file
BIN
demos/vdu/Colours
Normal file
Binary file not shown.
BIN
demos/vdu/Cursor
Normal file
BIN
demos/vdu/Cursor
Normal file
Binary file not shown.
BIN
demos/vdu/MODEs
Normal file
BIN
demos/vdu/MODEs
Normal file
Binary file not shown.
BIN
demos/vdu/Palette
Normal file
BIN
demos/vdu/Palette
Normal file
Binary file not shown.
BIN
demos/vdu/TextSize
Normal file
BIN
demos/vdu/TextSize
Normal file
Binary file not shown.
BIN
demos/vdu/VDUVars
Normal file
BIN
demos/vdu/VDUVars
Normal file
Binary file not shown.
|
@ -92,7 +92,6 @@ SHRXPLDFONT >>> ENTMAIN
|
|||
BNE :L1
|
||||
JSR SHRCLR24 ; Clear row 24
|
||||
>>> XF2AUX,SHRV22RET
|
||||
RTS
|
||||
|
||||
|
||||
* Explode one character to location pointed to by A3L
|
||||
|
@ -200,8 +199,20 @@ SHRXPLDROW LDX SHRPIXELS ; Pixels per byte
|
|||
|
||||
|
||||
* Clear text row 24 (0-based index)
|
||||
SHRCLR24
|
||||
* $9800
|
||||
SHRCLR24 CLC ; 65816 native mode
|
||||
XCE
|
||||
REP #$30 ; 16 bit M & X
|
||||
MX %00 ; Tell Merlin
|
||||
LDX #$00
|
||||
LDA #$00
|
||||
:L1 STAL $E19800,X
|
||||
INX
|
||||
INX
|
||||
CPX #$0500
|
||||
BNE :L1
|
||||
SEC ; 65816 emulation mode
|
||||
XCE
|
||||
MX %11 ; Tell Merlin
|
||||
RTS
|
||||
|
||||
|
||||
|
@ -263,6 +274,74 @@ SHRCHAR640 PHY ; Preserve Y
|
|||
RTS
|
||||
|
||||
|
||||
* Handle plotting & unplotting cursors
|
||||
* On entry: character in A, flags in Y
|
||||
* pointer to screen address in SHRVDUQ+0..1
|
||||
SHRCURSM >>> ENTMAIN
|
||||
PHY ; Preserve flags
|
||||
PHA ; Preserve character
|
||||
LDA SHRVDUQ+0 ; Copy pointer to A3L/H
|
||||
STA A3L
|
||||
LDA SHRVDUQ+1
|
||||
STA A3H
|
||||
LDA #$E1 ; Bank $E1
|
||||
STA A4L
|
||||
LDA SHRPIXELS ; Pixels per byte
|
||||
CMP #$02 ; 2 is 320-mode (MODE 1)
|
||||
BNE :MODE0
|
||||
LDA #$04 ; 4 bytes in 320 mode
|
||||
LDX #$71 ; White/red
|
||||
BRA :S1
|
||||
:MODE0 LDA #$02 ; 2 bytes in 640 mode
|
||||
LDX #%11011101 ; White/red/white/red
|
||||
:S1 STA :BYTES ; Bytes per char
|
||||
STX :CURSBYTE
|
||||
LDA A3L ; LSB
|
||||
CLC
|
||||
ADC #<$460 ; $460 is seven rows
|
||||
STA A3L
|
||||
LDA A3H ; MSB
|
||||
ADC #>$460 ; $460 is seven rows
|
||||
STA A3H
|
||||
LDY #$00
|
||||
LDX #$00
|
||||
PLA ; Recover character
|
||||
PLP ; Recover flags
|
||||
BVC :S2 ; VC: Write cursor
|
||||
INX ; Advance to 2nd half of :SAVEBYTES
|
||||
INX
|
||||
INX
|
||||
INX
|
||||
:S2 BCC :CURSOROFF ; CC: Remove cursor
|
||||
:CURSORON
|
||||
LDAL [A3L],Y ; See if cursor shown
|
||||
CMP :CURSBYTE
|
||||
BEQ :DONE ; Cursor shown already, skip
|
||||
:L1 LDAL [A3L],Y
|
||||
STA :SAVEBYTES,X ; Preserve bytes under cursor
|
||||
LDA :CURSBYTE ; Byte of cursor data
|
||||
STAL [A3L],Y
|
||||
INX
|
||||
INY
|
||||
CPY :BYTES
|
||||
BNE :L1
|
||||
>>> XF2AUX,SHRCURSRET
|
||||
:CURSOROFF
|
||||
LDAL [A3L],Y ; See if cursor shown
|
||||
CMP :CURSBYTE
|
||||
BNE :DONE ; Cursor not shown, skip
|
||||
:L2 LDA :SAVEBYTES,X ; Restore bytes under cursor
|
||||
STAL [A3L],Y
|
||||
INX
|
||||
INY
|
||||
CPY :BYTES
|
||||
BNE :L2
|
||||
:DONE >>> XF2AUX,SHRCURSRET
|
||||
:BYTES DB $00 ; 2 for 640-mode, 4 for 320-mode
|
||||
:CURSBYTE DB $00 ; Cursor byte for mode
|
||||
:SAVEBYTES DS 8 ; Bytes under cursors
|
||||
|
||||
|
||||
* VDU5 plot char at graphics cursor position
|
||||
SHRVDU5CH >>> ENTMAIN
|
||||
CLC ; 65816 native mode
|
||||
|
@ -1013,7 +1092,7 @@ SHRLINELO MX %00 ; Tell merlin 16 bit M & X
|
|||
STA :D ; D = D + 2 * dy
|
||||
:S3 INX
|
||||
CPX :LIM ; Compare with x1
|
||||
BNE :L1
|
||||
BCC :L1
|
||||
|
||||
SEC ; 65816 emulation mode
|
||||
XCE
|
||||
|
@ -1089,7 +1168,7 @@ SHRLINEHI MX %00 ; Tell Merlin 16 bit M & X
|
|||
STA :D ; D = D + 2 * dx
|
||||
:S3 INX
|
||||
CPX :LIM ; Compare with y1
|
||||
BNE :L1
|
||||
BCC :L1
|
||||
|
||||
SEC ; 65816 emulation mode
|
||||
XCE
|
||||
|
@ -1488,7 +1567,7 @@ SHRPALCHANGE >>> ENTMAIN
|
|||
STAL $E19E00+9,X
|
||||
STAL $E19E00+17,X
|
||||
STAL $E19E00+25,X
|
||||
RTS
|
||||
BRA :DONE
|
||||
:MODE320 TXA
|
||||
AND #%00011110 ; Has already been shifted
|
||||
TAX
|
||||
|
@ -1496,7 +1575,7 @@ SHRPALCHANGE >>> ENTMAIN
|
|||
STAL $E19E00,X ; Store in logical slot
|
||||
LDA PALETTE320+1,Y ; Byte 2 of physical colour
|
||||
STAL $E19E00+1,X ; Store in logical slot
|
||||
>>> XF2AUX,VDUXXRET
|
||||
:DONE >>> XF2AUX,VDUXXRET
|
||||
|
||||
|
||||
* Assign a custom RGB colour to a 'logical' colour
|
||||
|
@ -1520,7 +1599,7 @@ SHRPALCUSTOM >>> ENTMAIN
|
|||
STAL $E19E00+9,X
|
||||
STAL $E19E00+17,X
|
||||
STAL $E19E00+25,X
|
||||
RTS
|
||||
BRA :DONE
|
||||
:MODE320 TXA
|
||||
AND #%00011110 ; Has already been shifted
|
||||
TAX
|
||||
|
@ -1528,7 +1607,7 @@ SHRPALCUSTOM >>> ENTMAIN
|
|||
STAL $E19E00,X ; Store in logical slot
|
||||
TYA ; R component
|
||||
STAL $E19E00+1,X ; Store in logical slot
|
||||
>>> XF2AUX,VDUXXRET
|
||||
:DONE >>> XF2AUX,VDUXXRET
|
||||
|
||||
|
||||
* Table of addresses of SHR rows (in reverse order)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#mame -w apple2ee -debug -sl5 mouse -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.po
|
||||
mame -w apple2gs -debug -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.po -harddisk2 tests/JGHMusic2.po
|
||||
mame -w apple2gs -debug -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.po -harddisk2 tests/acrn*po # tests/Creat*po
|
||||
|
|
BIN
tests/KBDTest
BIN
tests/KBDTest
Binary file not shown.
BIN
tests/Pixels
BIN
tests/Pixels
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user