openMSX TCL Scripting Corner (Emulation MSX Forum)MSX Resource Center               
              
English Nederlands Espa�ol Portugu�s Russian         
 News
   Frontpage
  News archive
  News topics

 Resources
   MSX Forum
  Articles
  Reviews
  Fair reports
  Photo shoots
  Fairs and meetings
  Polls
  Links
  Search

 Software
   Downloads
  Webshop

 MRC
   Who we are
  Join our team
  Donate
  Policies
  Contact us
  Link to Us
  Statistics

 Search
 
  

  

 Login
 

Username

Password




Don't you have an account yet? Become an MSX-friend and register an account now!.


 Statistics
 

There are 42 guests and 1 MSX friend online

You are an anonymous user.
 

MSX Forum


MSX Forum

Emulation - openMSX TCL Scripting Corner

Author

openMSX TCL Scripting Corner

Vampier
msx addict
Posts: 504
Posted: March 04 2006, 21:10   
Execute this TLC script from within the console. Next start the basic program This will allow you to control openMSX with Basic.

TCL code
proc openmsxcontrol {} {
	#scaler factor
	if {[peek 0xc000]==1} {set ::scale_factor 1}
	if {[peek 0xc000]==2} {set ::scale_factor 2}
	if {[peek 0xc000]==3} {set ::scale_factor 3}
	#Scaler Algotithm
	if {[peek 0xc001]==1} {set ::scale_algorithm simple}
	if {[peek 0xc001]==2} {set ::scale_algorithm Sai}
	if {[peek 0xc001]==3} {set ::scale_algorithm ScaleNx}
	if {[peek 0xc001]==4} {set ::scale_algorithm hq}
	if {[peek 0xc001]==5} {set ::scale_algorithm hqlite}
	#scanline
	set ::scanline [peek 0xc002]

	after time 1 openmsxcontrol
}



Basic Code
10 screen0:width80:keyoff:cls
11 s=0
15 ?"Scaler Factor     "
20 ?"[1] Scale Factor 1"
30 ?"[2] Scale Factor 2"
40 ?"[3] Scale Factor 3"
50 ?"------------------"
55 ?"Scaler Algorithm  "
60 ?"[Q] Simple        "
70 ?"[W] Sai	       "
80 ?"[E] ScaleNx       "
90 ?"[R] HQ	       "
95 ?"[T] HQLite        "
96 ?"------------------"
97 ?"[+] More Scanlines"
98 ?"[-] Less Scanlines"
100 a$=inkey$
101 if a$="1" then poke &hc000,1
102 if a$="2" then poke &hc000,2
103 if a$="3" then poke &hc000,3
104 rem renderers
105 if a$="q" then poke &hc001,1
106 if a$="w" then poke &hc001,2
107 if a$="e" then poke &hc001,3
108 if a$="r" then poke &hc001,4
109 if a$="t" then poke &hc001,5
110 if a$="+" then s=s+1
111 if a$="-" then s=s-1
112 if s>100 then s=100
113 if s<0 then s=0
114 poke &hc002,s
210 if a$=chr$(32) then end
211 goto 100

AuroraMSX

msx master
Posts: 1264
Posted: March 04 2006, 21:26   
Fun!
 
 







(c) 1994 - 2008 MSX Resource Center Foundation. MSX is a trademark of MSX Licensing Corporation.