|
Post by picachu on Jun 26, 2018 10:30:15 GMT
Good, again I'm around. I have set 100% to create my first spectrum game and I have thousands of doubts. Hehehe The case is that in the next tutorial, access to the basic lines of the charger, but what is not is how to get to those lines and that they appear on the screen, using the spectaculator. Well, if anyone knows something, I would really appreciate it. Thanks in advance. www.funspot.it/agd-menu-for-newbies/
|
|
|
Post by alessandro on Jun 26, 2018 13:53:58 GMT
Hi picachu, if you are referring to the BASIC loading / controls menu in the web page you linked, remember that BASIC programs should be either entered and saved the old way, i.e. by typing them directly on your real or emulated Spectrum and saved onto a real or virtual tape, or done in a quicker, more efficient way thanks to today's opportunities. The web page suggests the use of BasIn; I used it myself several years ago, but I have been composing BASIC programs with ZX-Editor for a long time, and that is my personal suggestion. If you want to enter that BASIC menu program, highlight the program lines as usual by passing your mouse cursor over them and pressing the left mouse button, then press CTRL+C to copy the lines to clipboard. Then do the following: - Install and run ZX-Editor - Select File > New file... > Simple tape file and click on OK - From the drop-down menu select "program autostart header" - Enter a name for the file in the "program name:" row and click on OK - Click on the Paste icon ("inserts the clipboard etc."). The program lines should now apper in ZX-Editor's window - Select File > Save file (or click on the diskette icon), type a name for your file, and click on Save in the dialog window. You now have a .TAP file of the BASIC program. Remember to change the number after CLEAR in line 1 according to the start of your AGD game code block, i.e. if your game code block starts at 30500 then you must substitute the number after CLEAR with 30499 (30500 - 1). For the record, my very first games were managed with BASIC menu programs similar to that, which also included other features like key redefinition. But once I learnt a bit of Z80 Assembly, I did them in machine code for much greater speed and efficiency.
|
|
|
Post by picachu on Jun 26, 2018 19:30:03 GMT
Thank you very much for answering Alessandro. Ok, I understand that you have to write the lines of Basic in a separate program and save it in a tap. Perfect. But how do I introduce the load of Tap into my AGD project?
|
|
|
Post by alessandro on Jun 26, 2018 19:53:52 GMT
Just use the same .TAP file containing the BASIC starter program to record the AGD project on it with the virtual tape recorder of Spectaculator. The AGD game should be saved without a BASIC loader. If you need an utility to manage tape/disk image files easily I absolutely recommend you ZX-Blockeditor, which also integrates with ZX-Editor.
|
|
|
Post by picachu on Jun 26, 2018 21:15:06 GMT
Just use the same .TAP file containing the BASIC starter program to record the AGD project on it with the virtual tape recorder of Spectaculator. The AGD game should be saved without a BASIC loader. If you need an utility to manage tape/disk image files easily I absolutely recommend you ZX-Blockeditor, which also integrates with ZX-Editor. Now I understand much more, thank you very much Alessandro. You are a teacher, if everything goes well, and with your permission I will name you in the credits. regards.
|
|
|
Post by lukebord1 on Jun 27, 2018 6:43:46 GMT
...what is not is how to get to those lines and that they appear on the screen, using the spectaculator... BASIC lines is intended to be typed accessing the ZX Spectrum. So, excluding the real machine, you can choose to type a ZX Spectrum BASIC program through an emulator or an utility, which is usually a personal choice. My preference goes to the excellent BASin by Paul Dunn, which has an in-built tape creator and lots of useful functionalities: sites.google.com/site/ulaplus/home/zx-spin-and-basinHave fun ;-)
|
|
|
Post by picachu on Jun 28, 2018 10:57:35 GMT
Just use the same .TAP file containing the BASIC starter program to record the AGD project on it with the virtual tape recorder of Spectaculator. The AGD game should be saved without a BASIC loader. If you need an utility to manage tape/disk image files easily I absolutely recommend you ZX-Blockeditor, which also integrates with ZX-Editor. Good family I have tried a small line of code with an AGD test project and this error occurs to me. The small line code 10 loads, but as soon as the code of the AGD project is loaded, the error that you see in the photo occurs. CODE LINE 10; 10 CLEAR 31214: BORDER 0: PAPER 0: INK 0: CLS: PRINT BRIGHT 1; INK 7; AT 9,6;"THE GAME IS LOADING"; AT 12,10; INVERSE 1;"PLEASE WAIT": PRINT AT 0,0: LOAD ""SCREEN$: POKE 23739,111: LOAD ""CODE: RANDOMIZE USR 32000 Please help me !!!!
|
|
|
Post by lukebord1 on Jun 28, 2018 14:36:32 GMT
Picachu, before writing lines of code, you should understand the meaning of commands.
First of all, the CLEAR command needs a different value: your AGD game seems to start at 31120, so you have to type "CLEAR 31119" (or a lower value). If it starts at a different address, fix the CLEAR value by simply subtracting a byte.
Then, you have a loader and a machine code block, you don't use a loading screen. So, the instruction "LOAD ""SCREEN$" must be omitted.
|
|
|
Post by picachu on Jun 28, 2018 16:10:02 GMT
Yes, thank you very much for responding. It is that I made several tests and the image does not correspond. But actually I probe it with the address 31119. And it happens exactly the error of the image Picachu, before writing lines of code, you should understand the meaning of commands.
First of all, the CLEAR command needs a different value: your AGD game seems to start at 31120, so you have to type "CLEAR 31119" (or a lower value). If it starts at a different address, fix the CLEAR value by simply subtracting a byte.
Then, you have a loader and a machine code block, you don't use a loading screen. So, the instruction "LOAD ""SCREEN$" must be omitted.
|
|
|
Post by alessandro on Jun 28, 2018 17:35:10 GMT
Hi picachu, you do not have a loading screen in your TAP file in fact. Therefore when the Spectrum tries to load one with the LOAD "" SCREEN$ syntax, it finds the AGD code block, and returns the Tape loading error message. This happens because SCREEN$ is equivalent to CODE 16384,6912 when paired with a LOAD command. 16384 is the start of the screen memory area in the Spectrum's RAM, which is 6912 bytes long. (You might have noticed that a full, uncompressed loading screen is 6912 bytes long.) As lukebord noted, there is no loading screen in your MENU3.tap file. You must then delete the LOAD "" SCREEN$ command from your BASIC program and save it again on a new TAP file, named MENU4.TAP for example, then save again the AGD game code on the same .TAP file. An alternative, better way to do the same without recurring to a new .TAP file would be to install ZX-Blockeditor and ZX-Editor (in case you didn't already) and modify the BASIC block directly from there. Just open MENU3.tap in ZX-Blockeditor, highlight the BASIC block in the ZX-Blockeditor window and click on the icon with a cube and a capital "E". On a side note, if most of this seems gibberish to you then I would recommend you to read the Spectrum BASIC programming manual. If you do not have a printed copy at your disposal, you can find an online version at this address.
|
|
|
Post by picachu on Jun 28, 2018 21:16:03 GMT
Ok. Thank you very much. But in a normal case, the ideal is to use a screen of load. I go to add a screen of load and have that such. I expect to have luck. Hi picachu, you do not have a loading screen in your TAP file in fact. Therefore when the Spectrum tries to load one with the LOAD "" SCREEN$ syntax, it finds the AGD code block, and returns the Tape loading error message. This happens because SCREEN$ is equivalent to CODE 16384,6912 when paired with a LOAD command. 16384 is the start of the screen memory area in the Spectrum's RAM, which is 6912 bytes long. (You might have noticed that a full, uncompressed loading screen is 6912 bytes long.) As lukebord noted, there is no loading screen in your MENU3.tap file. You must then delete the LOAD "" SCREEN$ command from your BASIC program and save it again on a new TAP file, named MENU4.TAP for example, then save again the AGD game code on the same .TAP file. An alternative, better way to do the same without recurring to a new .TAP file would be to install ZX-Blockeditor and ZX-Editor (in case you didn't already) and modify the BASIC block directly from there. Just open MENU3.tap in ZX-Blockeditor, highlight the BASIC block in the ZX-Blockeditor window and click on the icon with a cube and a capital "E". On a side note, if most of this seems gibberish to you then I would recommend you to read the Spectrum BASIC programming manual. If you do not have a printed copy at your disposal, you can find an online version at this address.
|
|
|
Post by picachu on Jun 29, 2018 16:39:10 GMT
Very well, I have tried to eliminate the line that you have commented to me and effectively now it does not give error in the load. But the supposed menu does not appear, it is supposed that a menu should appear where to choose type of keyboard or sinclair, etc. My idea is to make a menu like the one generated with AGD but to put a background image, or some graphic details, is just that.
|
|
|
Post by alessandro on Jun 29, 2018 18:24:40 GMT
But the supposed menu does not appear, it is supposed that a menu should appear where to choose type of keyboard or sinclair, etc. Picachu, could you post a screenshot of the BASIC program listing? My idea is to make a menu like the one generated with AGD but to put a background image, or some graphic details, is just that. If you wish to add a background image to the menu you should store it in a free region of RAM and recall it whenever the menu appears. However, I think this is a bit too much for now. I'd concentrate on the menu program first and, once it works properly, think about enhancing it. One thing at a time
|
|
|
Post by picachu on Jun 30, 2018 7:39:16 GMT
You are right all Alessandro. Better to focus on having the menu work. I'm going to pass you a capture with the code. It makes the screen of "please wait", it continues loading and afterwards when it finishes, it appears directly the screen0 of the game in AGD, the menu written in basic does not appear in any moment. Hopefully we can find the problem. . Thank you. But the supposed menu does not appear, it is supposed that a menu should appear where to choose type of keyboard or sinclair, etc. Picachu, could you post a screenshot of the BASIC program listing? My idea is to make a menu like the one generated with AGD but to put a background image, or some graphic details, is just that. If you wish to add a background image to the menu you should store it in a free region of RAM and recall it whenever the menu appears. However, I think this is a bit too much for now. I'd concentrate on the menu program first and, once it works properly, think about enhancing it. One thing at a time
|
|
|
Post by picachu on Jun 30, 2018 11:20:32 GMT
Problem solved. the problem was in the randomize for line 1. YEAHHH!!!! i'm very happy!!!!
|
|