Search found 348 matches
- Sat Aug 01, 2020 11:39 am
- Forum: Games
- Topic: In search of...
- Replies: 38
- Views: 15140
Re: In search of...
Yes. Well. The setup of the Sokoban game, with its bitmasks to signify the contents of a location is a great find. But, in the algorithm: What is the use of trying to get information on a second-adjacent location if you're not even sure you're going to impact it ? Because, maybe the first-adjacent l...
- Fri Jul 31, 2020 3:24 am
- Forum: Games
- Topic: In search of...
- Replies: 38
- Views: 15140
Re: In search of...
PEEK-ing "out of bounds" is not really proper programming.
Replacing line 46 as follows already fixes it. Can't say it complicates code.
Regards,
Wim.
Replacing line 46 as follows already fixes it. Can't say it complicates code.
Code: Select all
46 A=PEEK(P):B=PEEK(P+D):ONBAND1GOTO44:C=PEEK(P+D+D):IF(BAND3)=0THENPOKEV+12,240:GOSUB52
Wim.
- Fri Jul 31, 2020 1:53 am
- Forum: Games
- Topic: In search of...
- Replies: 38
- Views: 15140
Re: In search of...
There is a minor bug in the Sokoban game at line 46. The PEEK(P+D+D) might peek beyond screen limits and find an inconsistent value there. The fix is to do the PEEK only after a box is found at P+D. I came across this when converting the game to WimBasic where I use CEEK. CEEK checks parameter bound...
- Mon Jul 20, 2020 2:52 am
- Forum: Programming
- Topic: New and improved version of WimBasic
- Replies: 1
- Views: 222
New and improved version of WimBasic
Hello all, A new version of WimBasic is now available at http://wimbasic.webs.com . - It now has an 'autostart' function: on cold boot, when there is a file called WBSTART present in device #8, it loads and runs it. - The output of ">$" (also in combination with EXEC), can now be captured ...
- Fri Jul 17, 2020 1:53 pm
- Forum: Programming
- Topic: Time out on read on serial bus
- Replies: 11
- Views: 505
Re: Time out on read on serial bus
This is what it has become: filename = "$" LFS=1,8,0 LAE6E JSR $FFC0 ; open logical file JSR LAE77 ; open channel for input JSR LAE71 ; read two bytes LAE70 JSR LAE71 ; read two bytes LDA $90 ; check status BNE LAE80 ; EOF or error, exit JSR $FFE1 ; check stop key BEQ LAE80 JSR LAE71 ; rea...
- Fri Jul 17, 2020 3:53 am
- Forum: Programming
- Topic: Time out on read on serial bus
- Replies: 11
- Views: 505
Re: Time out on read on serial bus
Hi Mike, Thank you for your enlightenment on this. I have built it and tested it now and it works ! The only drawback is that the ML-routine has grown out of proportions and handling the STOP-key needs attention. I'll reconsider implementing it. Nonetheless an learning experience, thanks again. Rega...
- Fri Jul 17, 2020 1:51 am
- Forum: Programming
- Topic: Time out on read on serial bus
- Replies: 11
- Views: 505
Re: Time out on read on serial bus
The only way I could get this to work is to read the entire directory listing into memory and create a file from there, as per code below. It looks like on the IEC you just can't have a directory and a regular file open at the same time. 1 dimd$(500):open2,8,0,"$":get#2,a$:get#2,a$ 2 get#2...
- Thu Jul 16, 2020 2:18 am
- Forum: Programming
- Topic: Time out on read on serial bus
- Replies: 11
- Views: 505
Re: Time out on read on serial bus
But I have tried with a target file on device #9. This also doesn't work.
- Thu Jul 16, 2020 2:03 am
- Forum: Programming
- Topic: Time out on read on serial bus
- Replies: 11
- Views: 505
Re: Time out on read on serial bus
The actual value is $02.
- Thu Jul 16, 2020 1:32 am
- Forum: Programming
- Topic: Time out on read on serial bus
- Replies: 11
- Views: 505
Re: Time out on read on serial bus
LA4CC is meant for scroll control on screen. It reads $028D and loops/waits based on shift/cbm/ctrl key combinations. During testing I'm not touching the keyboard, so effectively it only prints a $0D.
I've tried moving that call to right before the call to $DDCD, but no avail.
I've tried moving that call to right before the call to $DDCD, but no avail.
- Thu Jul 16, 2020 12:50 am
- Forum: Programming
- Topic: Time out on read on serial bus
- Replies: 11
- Views: 505
Time out on read on serial bus
All, In WimBasic, in Vice, I try the following program to obtain a directory listing and save it in a file: 10 OPEN2,8,1,"DIRLIST" 20 CMD2 30 EXEC">$" 40 PRINT#2 50 CLOSE2 Line 30 represents the ML code below. During the first iteration a timeout on read on the serial bus occurs....
- Tue Jun 30, 2020 6:28 am
- Forum: Programming
- Topic: Toggle a bit in BASIC
- Replies: 14
- Views: 984
Re: Toggle a bit in BASIC
Hmm. Interesting idea: if you're only interested in the result of XOR being zero or not, then store that result in Zp $61.
Back in Basic you could make use of the IF A$ THEN... quirk. So there's no assignment but only flow-control.
Regards,
Wim
- Tue Jun 30, 2020 1:41 am
- Forum: Programming
- Topic: Toggle a bit in BASIC
- Replies: 14
- Views: 984
Re: Toggle a bit in BASIC
The ML equivalent is most probably faster because the variables don't need to be found and converted twice. Below is the implementation in WimBasic. It is called by R=XOR(A,B) where A, B and R are signed integers (-32768..32767). ; ; ;Perform XOR ; LA6DE JSR $CEFA ; check round bracket open JSR $CD8...
- Mon Jun 22, 2020 3:16 am
- Forum: Programming
- Topic: Setting and Reading BASIC Variables
- Replies: 2
- Views: 285
Re: Setting and Reading BASIC Variables
Setting and reading Basic variables from assembly happens a few times in WimBasic. 1. Setting EC and EL during ON ERROR handling and, similar, settting DR and DQ from DIVMOD. I thought about implementing these in integer variables but didn't find it worth the hassle. All calculations are done in flo...
- Fri Jun 19, 2020 9:41 am
- Forum: Games
- Topic: VIC Rally aka Chequered Flag (1984)
- Replies: 21
- Views: 1595
Re: VIC Rally aka Chequered Flag (1984)
Hmm... works with me.
Code: Select all
xvic RALLY.d64:boot