INPUT Magazine Listing / Electron Error ?

discussion of beeb/electron applications, languages, utils and educational s/w
User avatar
0xC0DE
Posts: 223
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: INPUT Magazine Listing / Electron Error ?

Post by 0xC0DE » Tue May 14, 2019 1:18 pm

BeebMan2018 wrote:
Tue May 14, 2019 1:09 pm
OK I spotted my Typo :
There is another typo at line 30. Check my example program carefully :wink:
0xC0DE
Visit my YouTube channel featuring my demos for Acorn Electron and BBC Micro

BeebMan2018
Posts: 106
Joined: Sun Nov 04, 2018 3:01 am
Contact:

Re: INPUT Magazine Listing / Electron Error ?

Post by BeebMan2018 » Tue May 14, 2019 1:48 pm

OK I seem to have got it this time. I did not understand that the Machine Code Routine I initially type in was designed to save the FramePrint separately. I still do not understand what im actually doing however :/ I know its to handle the tank and frog and suspect its to speed up there movement but .... yea. If you can further enlighten me that would be awesome.
Attachments
Most Recent.JPG

User avatar
0xC0DE
Posts: 223
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: INPUT Magazine Listing / Electron Error ?

Post by 0xC0DE » Tue May 14, 2019 2:02 pm

The machine code routine at &D00 is going to print a bunch of user defined characters (tank? frog?) and spaces on the screen. That's all.
It's not even that useful to do it in machine code.

Oh yeah, and it seems that your machine code routine at &D00 is indeed correct! =D>

Btw, when you run the main game later on (TANKFROG?) you have to make sure that this machine code routine is actually active at &D00!!
Last edited by 0xC0DE on Tue May 14, 2019 2:04 pm, edited 1 time in total.
0xC0DE
Visit my YouTube channel featuring my demos for Acorn Electron and BBC Micro

BeebMan2018
Posts: 106
Joined: Sun Nov 04, 2018 3:01 am
Contact:

Re: INPUT Magazine Listing / Electron Error ?

Post by BeebMan2018 » Tue May 14, 2019 2:53 pm

0xC0DE wrote:
Tue May 14, 2019 2:02 pm
The machine code routine at &D00 is going to print a bunch of user defined characters (tank? frog?) and spaces on the screen. That's all.
It's not even that useful to do it in machine code.

Oh yeah, and it seems that your machine code routine at &D00 is indeed correct! =D>

Btw, when you run the main game later on (TANKFROG?) you have to make sure that this machine code routine is actually active at &D00!!
OK ummm. so the Machine Code i typed in saved something ! That something is added to the game i enter ? or do i have to run the machine code every time then new and then load the game ?

alex_farlie
Posts: 142
Joined: Sun Jul 07, 2013 9:46 pm
Contact:

Re: INPUT Magazine Listing / Electron Error ?

Post by alex_farlie » Tue May 14, 2019 2:54 pm

0xC0DE wrote:
Tue May 14, 2019 2:02 pm
The machine code routine at &D00 is going to print a bunch of user defined characters (tank? frog?) and spaces on the screen. That's all.
It's not even that useful to do it in machine code.

Oh yeah, and it seems that your machine code routine at &D00 is indeed correct! =D>

Btw, when you run the main game later on (TANKFROG?) you have to make sure that this machine code routine is actually active at &D00!!
Essentially it's doing:-
IF X%<>0 THEN A%=&E0+((X%-1)*9): ELSE A%=&20:
FORI%=1TO3: FOR J%=1TO3:VDU A%:
IF X%<>0 THEN A%=A%+1:
NEXT J%:VDU10,8,8,8:NEXT I%

There are probably more efficient ways to do that in portable 6502 code than the example. , BBC BASIC is fairly fast as it is.

True 'Sprite' routines on the BBC micro are more complex, because of how the screen memory is laid out.
Last edited by alex_farlie on Tue May 14, 2019 2:55 pm, edited 2 times in total.

User avatar
0xC0DE
Posts: 223
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: INPUT Magazine Listing / Electron Error ?

Post by 0xC0DE » Tue May 14, 2019 3:10 pm

BeebMan2018 wrote:
Tue May 14, 2019 2:53 pm
OK ummm. so the Machine Code i typed in saved something ! That something is added to the game i enter ? or do i have to run the machine code every time then new and then load the game ?
I haven't looked at the main TANKFROG program. But you have to load the machine code routine (the &59 bytes in file FramePrint) at &D00 before running the main program.
The main program will have at least one CALL &D00 to call this machine code routine at &D00.

So, to play the game, you would type something like:

Code: Select all

*LOAD "FramePrint" D00
CHAIN "TANKFROG"
Unless of course the main program TANKFROG loads the FramePrint for you. Again, I haven't looked at that.
0xC0DE
Visit my YouTube channel featuring my demos for Acorn Electron and BBC Micro

BeebMan2018
Posts: 106
Joined: Sun Nov 04, 2018 3:01 am
Contact:

Re: INPUT Magazine Listing / Electron Error ?

Post by BeebMan2018 » Tue May 14, 2019 4:00 pm

0xC0DE wrote:
Tue May 14, 2019 3:10 pm
BeebMan2018 wrote:
Tue May 14, 2019 2:53 pm
OK ummm. so the Machine Code i typed in saved something ! That something is added to the game i enter ? or do i have to run the machine code every time then new and then load the game ?
I haven't looked at the main TANKFROG program. But you have to load the machine code routine (the &59 bytes in file FramePrint) at &D00 before running the main program.
The main program will have at least one CALL &D00 to call this machine code routine at &D00.

So, to play the game, you would type something like:

Code: Select all

*LOAD "FramePrint" D00
CHAIN "TANKFROG"
Unless of course the main program TANKFROG loads the FramePrint for you. Again, I haven't looked at that.
Thanks for the explanation and all the previous help. Its much appreciated. I'm good for now but if i run into further problems i will give you a shout. I never thought id get excited over the old 8 bits again. 35 years on and its like Xmas :) LOL

User avatar
0xC0DE
Posts: 223
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: INPUT Magazine Listing / Electron Error ?

Post by 0xC0DE » Tue May 14, 2019 4:06 pm

:mrgreen: :mrgreen: :mrgreen: :lol: 8)
0xC0DE
Visit my YouTube channel featuring my demos for Acorn Electron and BBC Micro

Post Reply