Have an idea where this might go
Re: Have an idea where this might go
I think you are going to struggle with XP as VSCode requires the following which is not available on XP
Additional Windows requirements
Microsoft .NET Framework 4.5.2 is required for VSCode. If you are using Windows 7, please make sure .NET Framework 4.5.2 is installed.
NB I've just fired up a virtual XP machine and it fails trying to install 4.5.2
Probably worth upgrading your laptop to Windows 10, you might still get it free, but if not buy a key from somewhere like G2A (other sites are available)
I think I only paid about £15 to use in Parallels
Additional Windows requirements
Microsoft .NET Framework 4.5.2 is required for VSCode. If you are using Windows 7, please make sure .NET Framework 4.5.2 is installed.
NB I've just fired up a virtual XP machine and it fails trying to install 4.5.2
Probably worth upgrading your laptop to Windows 10, you might still get it free, but if not buy a key from somewhere like G2A (other sites are available)
I think I only paid about £15 to use in Parallels
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Have an idea where this might go
I doubt it could handle win10, it's probably 20 years old, the screen is 4:3 which is ideal for the emulator in full screen though.
Re: Have an idea where this might go
I'm sure (99%) that I was running an older version of beebem on my XP netbook with vs6, but I built it locally with static linking as I do for tools. If it is vscode, I can't help.
Re: Have an idea where this might go
I gave up trying to get it to work, tried it on win10 desktop too and it closes down immediately with no message.
I'll work on electrem over multiple files, it'll just be a bit awkward.
I'll work on electrem over multiple files, it'll just be a bit awkward.
Re: Have an idea where this might go
Finally I've got round to getting this sorted, 8 way per pixel scrolling. This is without the double buffering so is not very smooth, and there's room for optimization. Works on electrem and not tried on anything else.
Keys are z x ? *
Keys are z x ? *
Code: Select all
10 MODE 5
20 HIMEM=&3000
30 Q%=&5200
40 DIM char% 896
50 char%=(char%+255)AND&FF00
60 tile%=char%+256
70 map%=tile%+256
80 READ CH%:FOR I%=0 TO CH%-1:FOR J%=0 TO 3:READ ?(char%+J%+I%*4):NEXT J%:NEXT I%
90 READ TI%:FOR I%=0 TO TI%-1:FOR J%=0 TO 15:READ CH%:?(tile%+J%+I%*16)=CH%*4:NEXT J%:NEXT I%
100 FOR Y%=0 TO 7:FOR X%=0 TO 15:READ CH%:?(map%+Y%*16+X%)=CH%*16:NEXT X%:NEXT Y%
110 L%=&5000
120 FOR I%=0 TO 31
130 J%=I%
140 ?(L%+I%)=J%*8:?(L%+I%+32)=J%*8
150 ?(L%+I%+64)=J%*8+2:?(L%+I%+96)=J%*8+2
160 ?(L%+I%+128)=J%*8+4:?(L%+I%+160)=J%*8+4
170 ?(L%+I%+192)=J%*8+6:?(L%+I%+224)=J%*8+6
180 NEXT I%
190 L%=&5100
200 FOR I%=0 TO 63
210 ?(L%+I%)=(I%*32)DIV 256
220 ?(L%+I%+64)=?(L%+I%)
230 NEXT I%
240 P%=&70
250 [OPT 0
260 .px EQUW 0
270 .ipx EQUB 0
280 .py EQUW 0
290 .temp EQUD 0
300 .buff EQUD &30384048
310 .ycount EQUB 0
320 .base EQUB &58
330 .cols EQUD &FFF00F00
340 ]
350 FOR I%=0 TO 3 STEP 3
360 P%=Q%
370 [OPT I%
380 .drawi
390 LDX base:STX r0+5:STX r0+8:INX:STX r1+5:STX r1+8:INX:STX r2+5:STX r2+8:INX:STX r3+5:STX r3+8:INX:INX
400 STX r4+5:STX r4+8:INX:STX r5+5:STX r5+8:INX:STX r6+5:STX r6+8:INX:STX r7+5:STX r7+8:INX:INX
410 STX r8+5:STX r8+8:INX:STX r9+5:STX r9+8:INX:STX rA+5:STX rA+8:INX:STX rB+5:STX rB+8:INX:INX
420 STX rC+5:STX rC+8:INX:STX rD+5:STX rD+8:INX:STX rE+5:STX rE+8:INX:STX rF+5:STX rF+8
430 .draw LDA#3:STA ycount:SEC:SBC px:TAX:LSR A:LSR A:AND#31:STA iloop+1:TXA:AND#3:TAY:LDA buff,Y:STA buffbase+1
440 LDA py:TAY:ASL A:ASL A:ASL A:ASL A:ASL A:STA r0+1:INY:INY:INY:STY buffy+1
450 .oloop
460 LDA r0+1:STA r2+1:STA r4+1:STA r6+1:STA r8+1:STA rA+1:STA rC+1:STA rE+1
470 EOR #&80:STA r1+1:STA r3+1:STA r5+1:STA r7+1:STA r9+1:STA rB+1:STA rD+1:STA rF+1
480 .buffbase LDX#0
490 .buffy LDA#0:SEC:SBC ycount:AND#63:TAY
500 TXA:ORA &5100,Y:STA r0+2
510 TXA:ORA &5104,Y:STA r1+2
520 TXA:ORA &5108,Y:STA r2+2
530 TXA:ORA &510C,Y:STA r3+2
540 TXA:ORA &5110,Y:STA r4+2
550 TXA:ORA &5114,Y:STA r5+2
560 TXA:ORA &5118,Y:STA r6+2
570 TXA:ORA &511C,Y:STA r7+2
580 TXA:ORA &5120,Y:STA r8+2
590 TXA:ORA &5124,Y:STA r9+2
600 TXA:ORA &5128,Y:STA rA+2
610 TXA:ORA &512C,Y:STA rB+2
620 TXA:ORA &5130,Y:STA rC+2
630 TXA:ORA &5134,Y:STA rD+2
640 TXA:ORA &5138,Y:STA rE+2
650 TXA:ORA &513C,Y:STA rF+2
660 LDY #31:.iloop LDX &5000,Y
670.r0 LDA&100,Y:STA&120,X:STA&121,X
680.r1 LDA&100,Y:STA&160,X:STA&161,X
690.r2 LDA&100,Y:STA&1A0,X:STA&1A1,X
700.r3 LDA&100,Y:STA&1E0,X:STA&1E1,X
710.r4 LDA&100,Y:STA&120,X:STA&121,X
720.r5 LDA&100,Y:STA&160,X:STA&161,X
730.r6 LDA&100,Y:STA&1A0,X:STA&1A1,X
740.r7 LDA&100,Y:STA&1E0,X:STA&1E1,X
750.r8 LDA&100,Y:STA&120,X:STA&121,X
760.r9 LDA&100,Y:STA&160,X:STA&161,X
770.rA LDA&100,Y:STA&1A0,X:STA&1A1,X
780.rB LDA&100,Y:STA&1E0,X:STA&1E1,X
790.rC LDA&100,Y:STA&120,X:STA&121,X
800.rD LDA&100,Y:STA&160,X:STA&161,X
810.rE LDA&100,Y:STA&1A0,X:STA&1A1,X
820.rF LDA&100,Y:STA&1E0,X:STA&1E1,X
830 DEY:BMI iexit:JMP iloop:.iexit
840 DEC ycount:BMI oexit
850 LDA r0+1:CLC:ADC#32:STA r0+1
860 LDA iloop+1:CLC:ADC#64:STA iloop+1
870JMP oloop
880 .oexit RTS
890 .loopcount EQUB 0:.buffp EQUW 0:.down LDA py:CLC:ADC#64:AND#127:STA py
900 LDA #0:STA buffp:LDA py:AND#63:LSR A:ROR buffp:LSR A:ROR buffp:LSR A:ROR buffp:ADC#&30:STA buffp+1
910 LDA #0:STA loopcount:.downloop
920 LDA px:CLC:ADC loopcount:STA ix
930 LDA py:AND #127:STA iy:JSR getbyte
940 LDA buffp:STA t0+1:LDA buffp+1:STA t0+2:LDA ix:AND#3:ASL A:ASL A:ASL A:TAX:LDA ix:AND#124:LSR A:LSR A:ADC t0+1:STA t0+1:TXA:ADC t0+2:STA t0+2
950 LDA c0:.t0 STA &5800:INC loopcount:BPL downloop:LDA py:SEC:SBC#63:AND#127:STA py:RTS
960.up LDA py:SEC:SBC#1:AND#127:STA py
970 LDA #0:STA buffp:LDA py:AND#63:LSR A:ROR buffp:LSR A:ROR buffp:LSR A:ROR buffp:ADC#&30:STA buffp+1
980 LDA #0:STA loopcount:.uploop
990 LDA px:CLC:ADC loopcount:STA ix
1000 LDA py:AND #127:STA iy:JSR getbyte
1010 LDA buffp:STA t1+1:LDA buffp+1:STA t1+2:LDA ix:AND#3:ASL A:ASL A:ASL A:TAX:LDA ix:AND#124:LSR A:LSR A:ADC t1+1:STA t1+1:TXA:ADC t1+2:STA t1+2
1020 LDA c0:.t1 STA &5800:INC loopcount:BPL uploop:RTS
1030 .left LDX px:DEX:STX px:TXA:AND#3:ASL A:ASL A:ASL A:ADC#&30:STA buffp+1:TXA:LSR A:LSR A:AND#31:STA buffp
1040 LDA#63:STA loopcount:LDA px:STA ix:.leftloop LDA loopcount:CLC:ADC py:AND#127:STA iy:JSR getbyte
1050 LDA#0:STA t2+1:LDA loopcount:CLC:ADC py:AND#63:LSR A:ROR t2+1:LSR A:ROR t2+1:LSR A:ROR t2+1:STA t2+2:LDA t2+1:CLC:ADC buffp:STA t2+1:LDA t2+2:ADC buffp+1:STA t2+2:LDA c0:.t2 STA &5800:DEC loopcount:BPL leftloop:RTS
1060 .right LDX px:INX:STX px:TXA:AND#3:ASL A:ASL A:ASL A:ADC#&30:STA buffp+1:TXA:CLC:ADC#124:STA ix:LSR A:LSR A:AND#31:STA buffp
1070 LDA#63:STA loopcount:.rightloop LDA loopcount:CLC:ADC py:AND#127:STA iy:JSR getbyte
1080 LDA#0:STA t3+1:LDA loopcount:CLC:ADC py:AND#63:LSR A:ROR t3+1:LSR A:ROR t3+1:LSR A:ROR t3+1:STA t3+2:LDA t3+1:CLC:ADC buffp:STA t3+1:LDA t3+2:ADC buffp+1:STA t3+2:LDA c0:.t3 STA &5800:DEC loopcount:BPL rightloop:RTS
1090 .getbyte
1100 LDY iy
1110 TYA:AND#240:STA ml0+1:STA ml1+1
1120 TYA:AND#12:STA tl0+1:STA tl1+1
1130 TYA:AND#3:STA cl0+1:STA cl1+1
1140 LDA ix:LSR A:LSR A:TAY:LSR A:LSR A:.ml0 ORA#0:TAX:LDA map%,X:STA m0+1
1150 TYA:AND#3:.tl0 ORA#0:.m0 ORA#0:TAX:LDA tile%,X
1160 .cl0 ORA#0:TAX:LDA char%,X:STA c0
1170 LDA ix:AND#3:BNE nz:RTS:.nz
1180 LDA ix:CLC:ADC#4
1190 LSR A:LSR A:TAY:LSR A:LSR A:.ml1 ORA#0:TAX:LDA map%,X:STA m1+1
1200 TYA:AND#3:.tl1 ORA#0:.m1 ORA#0:TAX:LDA tile%,X
1210 .cl1 ORA#0:TAX:LDA char%,X:STA c1
1220 LDA ix:AND#3:TAX:DEX:BNE not1
1230 LDA c0:AND#&77:ASL A:STA c0:LDA c1:AND#&88:LSR A:LSR A:LSR A:ORA c0:STA c0:RTS
1240 .not1 DEX:BNE not2
1250 LDA c0:AND#&33:ASL A:ASL A:STA c0:LDA c1:AND#&CC:LSR A:LSR A:ORA c0:STA c0:RTS
1260 .not2
1270 LDA c0:AND#&11:ASL A:ASL A:ASL A:STA c0:LDA c1:AND#&EE:LSR A:ORA c0:STA c0:RTS
1280 .c0 EQUB 0:.c1 EQUB 0
1290 .sh EQUB 0
1300 .ix EQUB 0
1310 .iy EQUB 0
1320 ]
1330 NEXT I%
1340 CLS
1350 CALL drawi
1360 ?py=64
1370 FOR I%=0 TO 63
1380 CALL up:CALL draw
1390 NEXT I%
1400 REPEAT
1410 IF INKEY(-98) THEN CALL left
1420 IF INKEY(-67) THEN CALL right
1430 IF INKEY(-73) THEN CALL up
1440 IF INKEY(-105) THEN CALL down
1450 CALL draw
1460 UNTIL 0
1470 DATA 10
1480 DATA 136,34,4,0,161,65,161,65,40,88,40,88
1490 DATA 15,80,160,80,160,80,160,15
1500 DATA 161,66,132,8,1,18,36,88,160,80,160,80
1510 DATA 8,4,130,65,40,20,2,1
1520 DATA 12
1530 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1540 DATA 0,2,1,0,0,2,1,0,0,2,1,0,0,2,1,0
1550 DATA 0,0,0,0,3,3,3,3,4,4,4,4,0,0,0,0
1560 DATA 0,0,0,0,0,0,6,3,0,6,7,7,0,2,7,5
1570 DATA 6,7,1,0,7,7,5,0,4,5,0,0,0,0,0,0
1580 DATA 0,0,0,0,3,8,0,0,7,7,8,0,9,7,1,0
1590 DATA 0,2,7,8,0,9,7,7,0,0,9,4,0,0,0,0
1600 DATA 0,2,1,0,3,7,1,0,4,7,1,0,0,2,1,0
1610 DATA 0,2,1,0,0,2,7,3,0,2,7,4,0,2,1,0
1620 DATA 0,2,1,0,3,7,7,3,4,4,4,4,0,0,0,0
1630 DATA 0,0,0,0,3,3,3,3,4,7,7,4,0,2,1,0
1640 DATA 0,0,0,0,0,6,8,0,0,9,5,0,0,0,0,0
1650 REM
1660 DATA 3,2,2,10,2,2,2,2,2,2,2,2,2,2,2,5
1670 DATA 1,0,0,1,0,11,11,11,11,0,0,0,0,0,0,1
1680 DATA 1,0,3,9,2,10,2,2,2,2,2,2,2,5,0,1
1690 DATA 8,2,7,0,0,6,2,2,10,2,2,5,0,1,0,1
1700 DATA 1,0,1,0,0,0,0,0,1,0,0,1,0,1,0,1
1710 DATA 1,0,6,2,2,2,2,2,9,2,2,9,2,4,0,1
1720 DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
1730 DATA 6,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4
Last edited by Alexi on Sun Sep 03, 2023 1:37 pm, edited 3 times in total.
Re: Have an idea where this might go
Well done!
If you don't mind, I posted a bootable disk image so people can try it more easily.
If you don't mind, I posted a bootable disk image so people can try it more easily.
0xC0DE
"I program my home computer / Beam myself into the future"
Follow me on Twitter
Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
"I program my home computer / Beam myself into the future"
Follow me on Twitter
Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
Re: Have an idea where this might go
Don't mind at all, thanks.
Have you any way of trying it out on a real electron?
Have you any way of trying it out on a real electron?
Re: Have an idea where this might go
I do, but none of my Electrons is out to play at the moment
0xC0DE
"I program my home computer / Beam myself into the future"
Follow me on Twitter
Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
"I program my home computer / Beam myself into the future"
Follow me on Twitter
Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
Re: Have an idea where this might go
Ok.
Just looked at the code I posted and noticed a few format errors still in it so thanks for posting the image.
I'll be trying to put the double buffering back in sometime along with the keyboard controls in assembly too so it's not jumping between basic and assembly.
Re: Have an idea where this might go
It looks great! Lines 50 and 250 need splitting, but it worked first time after these were changed. I also changed the assembly loop step to 2 so as to suppress the output during assembly, speeding up the start-up a little.Alexi wrote: ↑Sun Sep 03, 2023 11:01 am Just looked at the code I posted and noticed a few format errors still in it so thanks for posting the image.
I'll be trying to put the double buffering back in sometime along with the keyboard controls in assembly too so it's not jumping between basic and assembly.
(I tested this in Elkulator, piping the listing in using a serial connection by typing in *FX 2,1 on the emulated Electron, pasting the listing into my serial console, and then typing *FX 2 in the console to return input control to the Electron. The serial interface support is something I added to the Stardot fork of Elkulator.)
Re: Have an idea where this might go
Thanks, fixed those 2 lines in the listing now.
Re: Have an idea where this might go
Looks like it's going well and I'm keen to see where it goes
Do you still want a win XP build off beebasm?
Do you still want a win XP build off beebasm?
Re: Have an idea where this might go
Sorry, completely forgot about this.
This is the version I use which seems to be based on a 1.10 pre-release and may have a couple of local tweaks.
My XP netbook doesn't want to boot, battery is probably too low and I've misplaced the charger, so isn't tested on XP.
- Attachments
-
- BeebAsm.zip
- (75.78 KiB) Downloaded 15 times
Re: Have an idea where this might go
Thanks very much. Not quite sure when I'm going to get round to doing more with this at the moment.
I have some thoughts what I'd like to try with it but what's there still needs a bit of work on particular parts to get it running a bit better. Ideally I'm wanting to do something that runs on an original unexpanded electron. Don't know if anyone's interested but if anyone wants to try making use of this for something then feel free, just give a little credit and let me know.
I have some thoughts what I'd like to try with it but what's there still needs a bit of work on particular parts to get it running a bit better. Ideally I'm wanting to do something that runs on an original unexpanded electron. Don't know if anyone's interested but if anyone wants to try making use of this for something then feel free, just give a little credit and let me know.