Page 1 of 1

Tried getting a graphic to appear on the screen. Nothing appears.

Posted: Tue Jan 31, 2023 3:43 pm
by KTKNM
I rewrote the code from the "Easy Sprites on ZX Spectrum" tutorial, and all that appears is the "C Nonsense in BASIC, 3456:1" text.
The exact same thing happens when I just paste the "ZX_Bitmap.asm" code from the sources folder.
If I replace ret with a loop, the screen is just a completely empty gray background.

Assembler I use: sjasmplus 1.18.2
Emulator I use: fuse

Re: Tried getting a graphic to appear on the screen. Nothing appears.

Posted: Fri Feb 03, 2023 4:53 am
by akuyou
Sorry, but I can personally only help if you assemble with the VASM assembler i use, and build with the scripts I provide.

otherwise, it could be any number of things I do not know about that is causing the problem.

Re: Tried getting a graphic to appear on the screen. Nothing appears.

Posted: Sun Feb 05, 2023 7:16 pm
by KTKNM
I don't use VASM because I have no idea how to.

For a very long time I have been relying on simple command prompt-based compilers (a different one per platform), and the code being written in the regular notepad.
It works for all code I was using back then.

Re: Tried getting a graphic to appear on the screen. Nothing appears.

Posted: Mon Feb 06, 2023 8:47 am
by akuyou
For the record, I re-downloaded my Devtools (2021 ver) and the latest sources, and assembled with the "Vasm ZXS" option

You can see the program works correctly as shown in the screenshot.
sample.png
sample.png (17.81 KiB) Viewed 2580 times
You will find different assemblers do work differently, even a simple command like "ORG" can behave differently, some assemblers pad with zeros between org statements, and some assembler directives are treated like commands, which cause unexpected effects...

I recently updated my Vasm build for some 6502 dev, and the "setdp" compiler directive now causes unintended padding if it occurs before the ORG, where it did not in the previous build - the point I'm making is that even different versions of the same assembler do not have the same effect. That's why I provide the assembler,emulators and sample sources I use.

You'll also find mathematical calculations do not always work the same, because of the way the assembler works with symbols during it's passes - and operator precedence may not be the same (Winape's assembler can't do brackets!)

And I haven't even asked how you're building a tape/snapshot file to run on your emulator - nor will I!

Anyway, When I start learning a new system, I typically find a simple example to start from, and convert it and get it running with VASM or whatever assembler I favor, That often takes a week or more - and is the hardest part of getting started, because you're fumbling with an unknown source, and unknown assembler, and unknown emulator/machine. Again I was hoping to help beginners by providing all 3... source,assembler and emulator.

But of course, I totally encourage you to go your own way, I'm in no way saying what I'm using is right, or that my examples are the best - I'm sure they are not.

I suggest you look for an alternative example which uses the assembler you favor..

Good luck!