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

Posts relating to ZX Spectrum (and clones)... also Spectrum NEXT
Post Reply
KTKNM
Posts: 11
Joined: Mon Jan 30, 2023 5:30 pm

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

Post by KTKNM » Tue Jan 31, 2023 3:43 pm

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

User avatar
akuyou
Posts: 562
Joined: Mon Apr 22, 2019 3:19 am
Contact:

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

Post by akuyou » Fri Feb 03, 2023 4:53 am

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.
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

KTKNM
Posts: 11
Joined: Mon Jan 30, 2023 5:30 pm

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

Post by KTKNM » Sun Feb 05, 2023 7:16 pm

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.

User avatar
akuyou
Posts: 562
Joined: Mon Apr 22, 2019 3:19 am
Contact:

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

Post by akuyou » Mon Feb 06, 2023 8:47 am

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 1355 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!
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

Post Reply

Return to “ZX Spectrum Assembly Programming”