init repo
This commit is contained in:
commit
90e6151613
3260 files changed
+3745062
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
@@ -0,0 +1,84 @@
|
||||
|
||||
{-----------------------------------------------------------------------+
|
||||
| |
|
||||
| GCL applications |
|
||||
| |
|
||||
+-----------------------------------------------------------------------}
|
||||
|
||||
gcl0x
|
||||
|
||||
{
|
||||
XXX Speed up scrolling by splitting work over frames
|
||||
XXX More interesting transitions
|
||||
}
|
||||
|
||||
{
|
||||
Draw full-screen image on screen (~1.5 seconds)
|
||||
}
|
||||
[def {DrawImage}
|
||||
{vAC} p= {Addres in ROM for image data}
|
||||
$0101 v= {Video table entry to control X}
|
||||
$0800 q= {Points in video memory}
|
||||
2 FrameRate= {Target frame rate (frames/pixel)}
|
||||
[do \videoY, 1& if=0loop] {Synchronize with video loop}
|
||||
\frameCount, t=
|
||||
160 [do i=
|
||||
|
||||
{Draw slice one pixel outside view}
|
||||
v, 160+ 255& q<.
|
||||
[do
|
||||
p \sysArgs6: \SYS_Read3_40 \sysFn: 40!! {Read 3 bytes from ROM}
|
||||
\SYS_Unpack_56 \sysFn: 56!! {Unpack to 4 bytes}
|
||||
q \sysArgs4: \SYS_Draw4_30 \sysFn: 30!! {Write 4 bytes to screen}
|
||||
$80 p+ p=
|
||||
q>++ q
|
||||
if>0loop]
|
||||
|
||||
{Shift in 4 controlled steps}
|
||||
[do
|
||||
t FrameRate+ 255& t=
|
||||
[do \frameCount, t- if<>0loop]
|
||||
|
||||
{Scroll 4 pixels left}
|
||||
v, 1+ v.
|
||||
3& if<>0loop]
|
||||
|
||||
{Advance to next slice}
|
||||
$c403 p+ p=
|
||||
$8800 q+ q=
|
||||
|
||||
i 4- if>0loop]
|
||||
ret
|
||||
] DrawImage=
|
||||
|
||||
{
|
||||
Wait number of seconds
|
||||
}
|
||||
[def {Wait}
|
||||
[do
|
||||
Delay=
|
||||
\frameCount, 60+ 255& tmp=
|
||||
[do \frameCount, tmp- if<>0loop]
|
||||
Delay 1- if>0loop]
|
||||
ret
|
||||
] WaitSeconds=
|
||||
|
||||
{
|
||||
Wait until all buttons are released
|
||||
}
|
||||
[def
|
||||
[do \serialRaw, 255^ if<>0loop]
|
||||
ret
|
||||
] WaitController=
|
||||
|
||||
{Draw images in a continuous loop}
|
||||
[do
|
||||
\packedBaboon DrawImage! 15 WaitSeconds! WaitController!
|
||||
\packedParrot DrawImage! 15 WaitSeconds! WaitController!
|
||||
\packedJupiter DrawImage! 15 WaitSeconds! WaitController!
|
||||
loop]
|
||||
|
||||
{-----------------------------------------------------------------------+
|
||||
| End |
|
||||
+-----------------------------------------------------------------------}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
|
||||
{-----------------------------------------------------------------------+
|
||||
| |
|
||||
| GCL applications |
|
||||
| |
|
||||
+-----------------------------------------------------------------------}
|
||||
|
||||
gcl0x
|
||||
|
||||
{
|
||||
XXX Speed up scrolling by splitting work over frames
|
||||
XXX More interesting transitions
|
||||
}
|
||||
|
||||
{
|
||||
Draw full-screen image on screen (~1.5 seconds)
|
||||
}
|
||||
[def {DrawImage}
|
||||
{vAC} p= {Addres in ROM for image data}
|
||||
$0101 v= {Video table entry to control X}
|
||||
$0800 q= {Points in video memory}
|
||||
2 FrameRate= {Target frame rate (frames/pixel)}
|
||||
[do \videoY, 1& if=0loop] {Synchronize with video loop}
|
||||
\frameCount, t=
|
||||
160 [do i=
|
||||
|
||||
{Draw slice one pixel outside view}
|
||||
v, 160+ 255& q<.
|
||||
[do
|
||||
p \sysArgs6: \SYS_Read3_40 \sysFn: 40!! {Read 3 bytes from ROM}
|
||||
\SYS_Unpack_56 \sysFn: 56!! {Unpack to 4 bytes}
|
||||
q \sysArgs4: \SYS_Draw4_30 \sysFn: 30!! {Write 4 bytes to screen}
|
||||
$80 p+ p=
|
||||
q>++ q
|
||||
if>0loop]
|
||||
|
||||
{Shift in 4 controlled steps}
|
||||
[do
|
||||
t FrameRate+ 255& t=
|
||||
[do \frameCount, t- if<>0loop]
|
||||
|
||||
{Scroll 4 pixels left}
|
||||
v, 1+ v.
|
||||
3& if<>0loop]
|
||||
|
||||
{Advance to next slice}
|
||||
$c403 p+ p=
|
||||
$8800 q+ q=
|
||||
|
||||
i 4- if>0loop]
|
||||
ret
|
||||
] DrawImage=
|
||||
|
||||
{
|
||||
Wait number of seconds
|
||||
}
|
||||
[def {Wait}
|
||||
[do
|
||||
Delay=
|
||||
\frameCount, 60+ 255& tmp=
|
||||
[do \frameCount, tmp- if<>0loop]
|
||||
Delay 1- if>0loop]
|
||||
ret
|
||||
] WaitSeconds=
|
||||
|
||||
{
|
||||
Wait until all buttons are released
|
||||
}
|
||||
[def
|
||||
[do \serialRaw, 255^ if<>0loop]
|
||||
ret
|
||||
] WaitController=
|
||||
|
||||
{Draw images in a continuous loop}
|
||||
[do
|
||||
{ \packedBaboon DrawImage! 15 WaitSeconds! WaitController! }
|
||||
\packedParrot DrawImage! 15 WaitSeconds! WaitController!
|
||||
\packedJupiter DrawImage! 15 WaitSeconds! WaitController!
|
||||
loop]
|
||||
|
||||
{-----------------------------------------------------------------------+
|
||||
| End |
|
||||
+-----------------------------------------------------------------------}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
|
||||
{-----------------------------------------------------------------------+
|
||||
| |
|
||||
| Pictures with small images |
|
||||
| |
|
||||
+-----------------------------------------------------------------------}
|
||||
gcl0x
|
||||
|
||||
{
|
||||
Based on the original Easter Egg "hidden" in ROM v1.
|
||||
|
||||
The image data is a stream of packed 6-bit pixels from ROM.
|
||||
The pixel data is XORed with all-ones (63).
|
||||
The value after a raw zero is a repeat count for 1..63 white pixels.
|
||||
If the repeat count is 0, we are at the end of the image.
|
||||
}
|
||||
|
||||
$0101 ShiftControl=
|
||||
|
||||
[def
|
||||
{ Select random screen memory position `q': }
|
||||
{ X ranges from 0..255 and Y from 8..127 }
|
||||
[do
|
||||
\SYS_Random_34 _sysFn= 34!! q=
|
||||
q>, 120- if>=0loop]
|
||||
128+ q>.
|
||||
|
||||
q r= 64+ r<. {End of line `r', 64 pixels wide image}
|
||||
0 i= {Index in unpacked byte buffer}
|
||||
n= {Count, or -1 when reading new count}
|
||||
|
||||
{ Loop until end of image stream }
|
||||
[do
|
||||
{ Fill buffer with next group of 4 bytes when needed }
|
||||
n [if<=0
|
||||
i [if=0 {Reached end of unpack buffer}
|
||||
p 0?? \sysArgs0. {Packed byte 0}
|
||||
p 1?? \sysArgs1. {Packed byte 1}
|
||||
p 2?? \sysArgs2. {Packed byte 2}
|
||||
p 3+ p= 255& {Advance read pointer}
|
||||
249^ [if=0 p 7+ p=] {Skip trampolines}
|
||||
\SYS_Unpack_56 _sysFn=
|
||||
56!! {Unpack 3 to 4 bytes}
|
||||
]
|
||||
n
|
||||
]
|
||||
|
||||
[if<0 {n == -1}
|
||||
{ Read repeat count for white pixels }
|
||||
\sysArgs0 i+ peek n=
|
||||
[if=0 ret] {End of image}
|
||||
i 1+ 3& i= {Rotate through 4-byte unpack buffer}
|
||||
else
|
||||
[if>0 {n > 0}
|
||||
{ Force white pixel }
|
||||
63 q.
|
||||
n 1- n=
|
||||
q<++ {Update X, but don't update i}
|
||||
else {n == 0, normal operation}
|
||||
{ Consume next pixel from stream }
|
||||
\sysArgs0 i+ peek [if<>0
|
||||
63^ q. {New pixel, not white}
|
||||
q<++
|
||||
else
|
||||
-1 n= {Next value is a repeat count}
|
||||
]
|
||||
i 1+ 3& i= {Rotate through 4-byte unpack buffer}
|
||||
]
|
||||
]
|
||||
|
||||
{ Wrap write pointer }
|
||||
q r- [if=0
|
||||
0 q. {1 pixel border/shadow on the right side}
|
||||
q 64- q<. q>++ {Next line}
|
||||
q [if<0 $8800 q+ q=] {Wrap around bottom of screen memory}
|
||||
q>, r>.
|
||||
]
|
||||
|
||||
\frameCount, ShiftControl. {Smooth scrolling}
|
||||
loop]
|
||||
] Transfer=
|
||||
|
||||
{--- Run ---}
|
||||
|
||||
[do
|
||||
\packedPictures p= {Pointer to packed image data}
|
||||
Transfer! {Unpack and draw three images}
|
||||
Transfer!
|
||||
Transfer!
|
||||
loop] {Repeat forever}
|
||||
|
||||
{-----------------------------------------------------------------------+
|
||||
| End |
|
||||
+-----------------------------------------------------------------------}
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user