Hi,
I just noticed that in latest version of OpenMSX the Finnish keyboard is working also on Console mode!!! As this opens up a whole new world, I wanted to try to make my second OpenMSX-script... How ever it seems that I'm just bouncing from one wall to another... There are not too many examples around and the web-manuals make me feel dizzy.
Now I feel I'm pretty much stuck... (and so is OpenMSX while trying to understand me) Anyone want to take a look & give me hint, how to take next few steps? I know that I'm doing wrong things and my code & approach is wrong as this has been purely trial and error one tiny problem at a time... it just happens when you put MSX coder in front of this kind of modern stuff ... I just wanted to learn some basics, but now I've come to a point when I feel that little guiding to right direction wouldn't hurt...
proc typemsx { filename { channel stdout } } { if { [ catch { # Open the file, and set up to process it in binary mode. set fid [open $filename r] fconfigure $fid -translation binary -encoding binary set addr 0xfbf0 debug break while { ! [ eof $fid ] } { #Convert byte from file as parameter good for poke-function (From "?"-type to integer or string... I don't know) set s [read $fid 1] binary scan $s H*@0 hex if {$hex=="" | $hex=="0a"} {} else { poke $addr 0x$hex incr addr if {$addr==0xfc17} { pokew 0xf3f8 $addr #Yeah... I couldn't get poke16 working pokew 0xf3fa 0xfbf0 ###### THIS LOOP KILLS THE OPENMSX ####### while {[peekw 0xf3f8]!=[peekw 0xf3fa]} { debug step } ########################################## set addr 0xfbf0 } } } if {$addr!=0xfbf0} { pokew 0xf3f8 $addr pokew 0xf3fa 0xfbf0 } } err ] } { catch { ::close $fid } debug cont return -code error $err } # When we're done, close the file. catch { ::close $fid } debug cont return } proc pokew {addr val} { debug write memory $addr [expr { $val & 255}] debug write memory [expr {$addr + 1}] [expr {($val >> 8) & 255}] } proc peekw {addr} { expr {[peek $addr] + 256 * [peek [expr {$addr + 1}]]} }