diff --git a/demo/toolbox1/Graphics.spin b/demo/toolbox1/Graphics.spin new file mode 100644 index 0000000..dbe7e03 Binary files /dev/null and b/demo/toolbox1/Graphics.spin differ diff --git a/demo/toolbox1/TV.spin b/demo/toolbox1/TV.spin new file mode 100644 index 0000000..b58adcf Binary files /dev/null and b/demo/toolbox1/TV.spin differ diff --git a/demo/toolbox1/bel-keyb.spin b/demo/toolbox1/bel-keyb.spin new file mode 100644 index 0000000..5333e3a Binary files /dev/null and b/demo/toolbox1/bel-keyb.spin differ diff --git a/demo/toolbox1/bel-mouse.spin b/demo/toolbox1/bel-mouse.spin new file mode 100644 index 0000000..c37ad5c Binary files /dev/null and b/demo/toolbox1/bel-mouse.spin differ diff --git a/demo/toolbox1/demo-1-koord.spin b/demo/toolbox1/demo-1-koord.spin new file mode 100644 index 0000000..3909ca5 Binary files /dev/null and b/demo/toolbox1/demo-1-koord.spin differ diff --git a/demo/toolbox1/demo-10-animation1.spin b/demo/toolbox1/demo-10-animation1.spin new file mode 100644 index 0000000..d2cd217 Binary files /dev/null and b/demo/toolbox1/demo-10-animation1.spin differ diff --git a/demo/toolbox1/demo-10-animation2.spin b/demo/toolbox1/demo-10-animation2.spin new file mode 100644 index 0000000..706c059 Binary files /dev/null and b/demo/toolbox1/demo-10-animation2.spin differ diff --git a/demo/toolbox1/demo-11-logo1.spin b/demo/toolbox1/demo-11-logo1.spin new file mode 100644 index 0000000..f51bb62 Binary files /dev/null and b/demo/toolbox1/demo-11-logo1.spin differ diff --git a/demo/toolbox1/demo-11-logo2.spin b/demo/toolbox1/demo-11-logo2.spin new file mode 100644 index 0000000..ee84762 Binary files /dev/null and b/demo/toolbox1/demo-11-logo2.spin differ diff --git a/demo/toolbox1/demo-12-matrix.spin b/demo/toolbox1/demo-12-matrix.spin new file mode 100644 index 0000000..8e4199b Binary files /dev/null and b/demo/toolbox1/demo-12-matrix.spin differ diff --git a/demo/toolbox1/demo-13-graphics_demo.spin b/demo/toolbox1/demo-13-graphics_demo.spin new file mode 100644 index 0000000..443dc65 Binary files /dev/null and b/demo/toolbox1/demo-13-graphics_demo.spin differ diff --git a/demo/toolbox1/demo-14-graphics_palette.spin b/demo/toolbox1/demo-14-graphics_palette.spin new file mode 100644 index 0000000..19a55d7 Binary files /dev/null and b/demo/toolbox1/demo-14-graphics_palette.spin differ diff --git a/demo/toolbox1/demo-15-sid1.spin b/demo/toolbox1/demo-15-sid1.spin new file mode 100644 index 0000000..6efa65a Binary files /dev/null and b/demo/toolbox1/demo-15-sid1.spin differ diff --git a/demo/toolbox1/demo-15-sid2.spin b/demo/toolbox1/demo-15-sid2.spin new file mode 100644 index 0000000..e267437 Binary files /dev/null and b/demo/toolbox1/demo-15-sid2.spin differ diff --git a/demo/toolbox1/demo-2-dots.spin b/demo/toolbox1/demo-2-dots.spin new file mode 100644 index 0000000..b4cab3d Binary files /dev/null and b/demo/toolbox1/demo-2-dots.spin differ diff --git a/demo/toolbox1/demo-3-objekte.spin b/demo/toolbox1/demo-3-objekte.spin new file mode 100644 index 0000000..f26008a Binary files /dev/null and b/demo/toolbox1/demo-3-objekte.spin differ diff --git a/demo/toolbox1/demo-4-boing.spin b/demo/toolbox1/demo-4-boing.spin new file mode 100644 index 0000000..bc2217c Binary files /dev/null and b/demo/toolbox1/demo-4-boing.spin differ diff --git a/demo/toolbox1/demo-5-scroller.spin b/demo/toolbox1/demo-5-scroller.spin new file mode 100644 index 0000000..afd4876 Binary files /dev/null and b/demo/toolbox1/demo-5-scroller.spin differ diff --git a/demo/toolbox1/demo-6-mouse1.spin b/demo/toolbox1/demo-6-mouse1.spin new file mode 100644 index 0000000..f84dc3f Binary files /dev/null and b/demo/toolbox1/demo-6-mouse1.spin differ diff --git a/demo/toolbox1/demo-6-mouse2.spin b/demo/toolbox1/demo-6-mouse2.spin new file mode 100644 index 0000000..6b09813 Binary files /dev/null and b/demo/toolbox1/demo-6-mouse2.spin differ diff --git a/demo/toolbox1/demo-7-satellite.spin b/demo/toolbox1/demo-7-satellite.spin new file mode 100644 index 0000000..77583ab Binary files /dev/null and b/demo/toolbox1/demo-7-satellite.spin differ diff --git a/demo/toolbox1/demo-8-sinus.spin b/demo/toolbox1/demo-8-sinus.spin new file mode 100644 index 0000000..a580772 Binary files /dev/null and b/demo/toolbox1/demo-8-sinus.spin differ diff --git a/demo/toolbox1/demo-9-lissajou1.spin b/demo/toolbox1/demo-9-lissajou1.spin new file mode 100644 index 0000000..9a14ff8 Binary files /dev/null and b/demo/toolbox1/demo-9-lissajou1.spin differ diff --git a/demo/toolbox1/demo-9-lissajou2.spin b/demo/toolbox1/demo-9-lissajou2.spin new file mode 100644 index 0000000..442f8d3 Binary files /dev/null and b/demo/toolbox1/demo-9-lissajou2.spin differ diff --git a/demo/toolbox1/gfx1.spin b/demo/toolbox1/gfx1.spin new file mode 100644 index 0000000..fc2226a --- /dev/null +++ b/demo/toolbox1/gfx1.spin @@ -0,0 +1,178 @@ +DAT +{ + video-treiber-frame + - basiert auf dem tollen tutorial von bamse + +30-09-2009-dr235 driver 1 - originalcode, anpassung an hive + driver 2 - senkrechte balken + driver 3 - einfarbige fläche + driver 4 - wandernde farbbalken, 1 byte pro pixel :) + driver 5 - + + +} + +CON + _CLKMODE = xtal1 + pll16x + _XINFREQ = 5_000_000 + +PUB start + + cognew(@entry,0) ' neue cog mit video-treiber starten + +DAT org 0 +entry jmp #Start_of_driver ' Start here... + +' NTSC sync stuff. +NTSC_color_freq long 3_579_545 ' NTSC Color Frequency +NTSC_hsync_VSCL long 39 << 12 + 624 ' Used for the Horisontal Sync +NTSC_active_VSCL long 188 << 12 + 3008 ' Used for the Vertical sync +NTSC_hsync_pixels long %%11_0000_1_2222222_11 ' Horizontal sync pixels +NTSC_vsync_high_1 long %%1111111_2222222_11 ' Vertical sync signal part one for lines 1-6 and 13 to 18 +NTSC_vsync_high_2 long %%1111111111111111 ' Vertical sync signal part two for lines 1-6 and 13 to 18 +NTSC_vsync_low_1 long %%2222222222222222 ' Vertical sync signal part one for lines 7-12 +NTSC_vsync_low_2 long %%22_1111111_2222222 ' Vertical sync signal part two for lines 7-12 +NTSC_sync_signal_palette long $00_00_02_8A ' The sync Palette + +' hbeat --------+ +------------------------- /cs +' clk -------+| | +' /wr ------+|| | +---------------------- videopins +' /hs -----+||| | | +' |||| |--+ -------- d0..d7 +tvport_mask long %00000000_01110000_00000000_00000000 ' Maske für Video-Pins am Hive +vsu_cfg long %01110100_00000000_00000100_01110000 ' Wert für VCFG-Register + +NTSC_Graphic_Lines long 244 ' Anzahl der sichtbaren Zeilen +NTSC_Graphics_Pixels_VSCL long 16 << 12 + 16 ' 16 clocks per pixel, 64 clocks per frame. + + +PAL0 long $01 +PAL1 long $0E +PAL2 long $0D +PAL3 long $0C +PAL4 long $0B +DIF1 long $00_10 +CNT_ANIM long $4 + +' Loop counters. +line_loop long $0 ' Line counter... +pix_loop long $0 +anim_loop long $0 + +' General Purpose Registers +r0 long $0 ' Initialize to 0 +r1 long $0 +r2 long $0 +r3 long $0 +c1 long $0 ' colorregister +c2 long $0 +c3 long $0 + +'========================== Start of the actual driver ============================================= + +Start_of_driver + ' VCFG, setup Video Configuration register and 3-bit tv DAC pins to output + mov VCFG, vsu_cfg ' Konfiguration der VSU + or DIRA, tvport_mask ' Set DAC pins to output + + ' CTRA, setup Frequency to Drive Video + movi CTRA,#%00001_111 ' pll internal routed to Video, PHSx+=FRQx (mode 1) + pll(16x) + mov r1, NTSC_color_freq ' r1: Color frequency in Hz (3.579_545MHz) + rdlong r2, #0 ' Copy system clock from main memory location 0. (80Mhz) + ' perform r3 = 2^32 * r1 / r2 + mov r0,#32+1 +:loop cmpsub r1,r2 wc + rcl r3,#1 + shl r1,#1 + djnz r0,#:loop + mov FRQA, r3 ' Set frequency for counter A + + +'========================== Start of Frame Loop ============================================== + +frame_loop + mov anim_loop, CNT_ANIM +frame_loop2 + +'========================== Screen ============================================= + + mov line_loop, NTSC_Graphic_Lines ' anzahl der zeilen laden (244) + +user_lines + '------ zeilensynchronisation + mov VSCL, NTSC_hsync_VSCL ' Setup VSCL for horizontal sync. + waitvid NTSC_sync_signal_palette, NTSC_hsync_pixels ' Generate sync. + + + '------ sichtbarer zeileninhalt + mov VSCL, NTSC_Graphics_Pixels_VSCL ' Setup VSCL for user pixels. + + '------ verschiedenfarbige balken ausgeben + mov c1, PAL4 + add c1, c3 + mov pix_loop, #23 +bar_loop + add c1, #$10 ' 8 x pixel einzeln! ausgeben + mov c2, c1 ' also 2 tiles + waitvid c2, #0 ' 8 bit pro pixel! + add c2, #1 + waitvid c2, #0 + add c2, #1 + waitvid c2, #0 + add c2, #1 + waitvid c2, #0 + sub c2, #1 + waitvid c2, #0 + sub c2, #1 + waitvid c2, #0 + sub c2, #1 + waitvid c2, #0 + sub c2, #1 + waitvid c2, #0 + + djnz pix_loop, #bar_loop + + sub c2, #1 + waitvid c2, #0 ' 4 mal extrapixel, für das timing + sub c2, #1 ' also insgesamt 188 pixel pro zeile + waitvid c2, #0 + sub c2, #1 + waitvid c2, #0 + sub c2, #1 + waitvid c2, #0 + + djnz line_loop, #user_lines ' schleife durch alle zeilen + +'========================== The 16 lines of Horizontal sync ================================== + + mov line_loop, #6 ' Line 244, start of first high sync. +vsync_high1 mov VSCL, NTSC_hsync_VSCL + waitvid NTSC_sync_signal_palette, NTSC_vsync_high_1 + mov VSCL, NTSC_active_VSCL + waitvid NTSC_sync_signal_palette, NTSC_vsync_high_2 + djnz line_loop, #vsync_high1 + + mov line_loop, #6 ' Line 250, start of the Seration pulses. +vsync_low mov VSCL, NTSC_active_VSCL + waitvid NTSC_sync_signal_palette, NTSC_vsync_low_1 + mov VSCL,NTSC_hsync_VSCL + waitvid NTSC_sync_signal_palette, NTSC_vsync_low_2 + djnz line_loop, #vsync_low + + mov line_loop, #6 ' Line 256, start of second high sync. +vsync_high2 mov VSCL, NTSC_hsync_VSCL + waitvid NTSC_sync_signal_palette, NTSC_vsync_high_1 + mov VSCL, NTSC_active_VSCL + waitvid NTSC_sync_signal_palette, NTSC_vsync_high_2 + djnz line_loop, #vsync_high2 + +'========================== End of Frame Loop ============================================= + djnz anim_loop, #frame_loop2 + add c3, #$10 + + +'========================== Animation ================================== + + jmp #frame_loop ' And repeat for ever... +FIT + \ No newline at end of file diff --git a/demo/toolbox1/vga.spin b/demo/toolbox1/vga.spin new file mode 100644 index 0000000..9acf513 Binary files /dev/null and b/demo/toolbox1/vga.spin differ diff --git a/doku/Thumbs.db b/doku/Thumbs.db index 5e72ea3..9c9b300 100644 Binary files a/doku/Thumbs.db and b/doku/Thumbs.db differ