Search found 350 matches
- Mon Nov 16, 2020 2:00 am
- Forum: Programming
- Topic: 6502 Carry Flag
- Replies: 16
- Views: 1917
Re: 6502 Carry Flag
For some reason--don't ask me why because I don't know--I woke up this morning with the question, "What's the most efficient way to invert the Carry Flag?" That is, set it when it's unset and unset it when it's set. I did not wake up with any practical uses for inverting the Carry Flag, o...
- Thu Nov 05, 2020 4:38 am
- Forum: Hardware and Tech
- Topic: Vic 20 - Black screen on working machine
- Replies: 13
- Views: 1054
Re: Vic 20 - Black screen on working machine
Hmm, C8 doesn't look too healthy...
- Mon Nov 02, 2020 1:05 pm
- Forum: Programming
- Topic: Power of WimBasic
- Replies: 8
- Views: 763
Re: Power of WimBasic
Maybe I could have found more sequences, but character bitmappings are constrained to 8 byte boundary.Why searching only on 8 byte boundary? Maybe it could find some more sequences with 1 byte steps?!
- Mon Nov 02, 2020 9:34 am
- Forum: Programming
- Topic: Power of WimBasic
- Replies: 8
- Views: 763
Re: Power of WimBasic
When you program in Basic on a VIC20, often speed and/or memory can be a issue. One trick to save memory and improve speed is to put as many statements as possible, separated by colons, on one Basic line. Each Basic line has an overhead of 4 bytes, so each line you save is 4 bytes you save. When per...
- Mon Nov 02, 2020 2:13 am
- Forum: Programming
- Topic: Power of WimBasic
- Replies: 8
- Views: 763
Re: Power of WimBasic
Copying memory blocks this way may also be used to manipulate arrays. - Swapping the contents of two arrays (using a string as the intermediate buffer). - (Re-)Initializing an array (e.g. with the contents of a string of 0's (STRING$(sizeof(array),0)). When the arraysize is 255 bytes or less, this c...
- Fri Oct 23, 2020 1:59 am
- Forum: Programming
- Topic: BIT #imm using the VIC-20 BASIC ROM
- Replies: 15
- Views: 1113
Re: BIT #imm using the VIC-20 BASIC ROM
Another thing to note is that BIT# in 65C02 does not modify N or V, but only Z.
Where in 6502 the BIT instructions do set N and V corresponding B7 and B6 of the memory location
Regards,
Wim.
Where in 6502 the BIT instructions do set N and V corresponding B7 and B6 of the memory location
Regards,
Wim.
- Fri Oct 23, 2020 1:31 am
- Forum: Programming
- Topic: BIT #imm using the VIC-20 BASIC ROM
- Replies: 15
- Views: 1113
Re: BIT #imm using the VIC-20 BASIC ROM
The most interesting values are probably the powers of 2, they're given here: $01 $C390 $02 $C39B $04 $C3E7 $08 $C3B9 $10 $C338 $20 $C1A1 $40 $CB5A $80 $C018 In character ROM, at location $8268 is a list of powers of two in descending order, and at $8270 in ascending order. These lists make it also...
- Wed Oct 07, 2020 1:43 am
- Forum: Programming
- Topic: message "division by zero error"
- Replies: 21
- Views: 1301
Re: message "division by zero error"
change line 260 to
Code: Select all
260 FOR I=4536 TO 4579 : POKE I,32 : NEXT I
- Wed Oct 07, 2020 1:03 am
- Forum: Programming
- Topic: message "division by zero error"
- Replies: 21
- Views: 1301
Re: message "division by zero error"
Armando. What memory configuration are you using ? Line 260 is assuming you have 3.5k or maybe 6.5k, but not +8k or +16k. What I think happens is that the POKEs in line 260 overwrite the memory space for simple variables, and subsequently Z cannot be found anymore, resulting in Z=0. In line 270 a A(...
- Tue Oct 06, 2020 4:45 am
- Forum: Programming
- Topic: message "division by zero error"
- Replies: 21
- Views: 1301
Re: message "division by zero error"
Hello Armando,
Can you make that program available to us ?
Regards,
Wim.
Can you make that program available to us ?
Regards,
Wim.
- Wed Sep 16, 2020 2:34 am
- Forum: Games
- Topic: BASIC 'Hearts' game
- Replies: 13
- Views: 1415
Re: BASIC 'Hearts' game
Here is the WimBasic version. Brought it down to 1912 bytes, 37 lines.
It autostarts in VICE.
Regards,
Wim.
It autostarts in VICE.
Regards,
Wim.
- Mon Sep 14, 2020 2:09 am
- Forum: Games
- Topic: BASIC 'Hearts' game
- Replies: 13
- Views: 1415
Re: BASIC 'Hearts' game
Hi Victragic, I suggest to make the sorting routine a bit faster / obsolete: Replace 73 t=0:n=1 74 ifd%(n,p)<d%(n-1,p)thent=d%(n-1,p):d%(n-1,p)=d%(n,p):d%(n,p)=t:ifn>1thenn=n-1:goto74 75 n=n+1:ifn<13then74 76 return with 73 n=i 74 ifn<12-rthend%(n,p)=d%(n+1,p):n=n+1:goto74 75 d%(n,p)=99 76 return an...
- Wed Sep 02, 2020 1:00 am
- Forum: Programming
- Topic: Auto-run on Load?
- Replies: 10
- Views: 1206
Re: Auto-run on Load?
Hello Robbie,
On a VIC with no further extensions, the key combination SHIFT-RUN/STOP does this. Only from tape, though.
On VICE, there is an 'Autostart' feature that loads and runs a program from disk #8.
Regards,
Wim
On a VIC with no further extensions, the key combination SHIFT-RUN/STOP does this. Only from tape, though.
On VICE, there is an 'Autostart' feature that loads and runs a program from disk #8.
Regards,
Wim
- Wed Aug 26, 2020 11:26 am
- Forum: Emulation and Cross Development
- Topic: Integrate with the host platforms filesystem (Linux)
- Replies: 4
- Views: 353
Re: Integrate with the host platforms filesystem (Linux)
Hello srowe
Thanks to strace , I now see that VICE opens files with the syscall openat() and does not use the O_ASYNC flag that is needed when addressing a pipe.
Regards,
Wim.
Thanks to strace , I now see that VICE opens files with the syscall openat() and does not use the O_ASYNC flag that is needed when addressing a pipe.
Regards,
Wim.
- Wed Aug 26, 2020 8:43 am
- Forum: Emulation and Cross Development
- Topic: Integrate with the host platforms filesystem (Linux)
- Replies: 4
- Views: 353
Integrate with the host platforms filesystem (Linux)
All, Has anyone ever tried to integrate VIC with the host platform through the filesystem ? That is, in linux do: ln -s /dev/urandom rnd xvic and then in VICE 10 OPEN1,8,0,"RND" 20 GET#1,A$:IFA$=""THENA$=CHR$(0) 30 PRINTASC(A$) 40 IFST=0THEN20 50 CLOSE1 This works. Also the /proc...