splitscreen.fs 556 B

1234567891011121314151617181920212223242526272829
  1. start-microcode splitscreen
  2. : 1+ d# 1 + ;
  3. : @ dupc@ swap 1+ c@ swab or ;
  4. : waitline ( u -- ) \ wait until raster is past u
  5. begin
  6. dup YLINE c@ =
  7. until
  8. drop
  9. ;
  10. : loadscroll ( a -- ) \ load SCROLL_X,Y from a
  11. dup c@ SCROLL_X c! 1+
  12. dup c@ SCROLL_Xhi c! 1+
  13. dup c@ SCROLL_Y c! 1+
  14. c@ dup SCROLL_Yhi c!
  15. d# 7 rshift SPR_DISABLE c!
  16. ;
  17. : main
  18. begin
  19. COMM+4 @ waitline COMM+6 loadscroll
  20. COMM+10 @ waitline COMM+12 loadscroll
  21. d# 300 waitline COMM+0 loadscroll
  22. again
  23. ;
  24. end-microcode