Search found 8 matches

by Nabir14
Sat Aug 03, 2024 6:17 pm
Forum: Newbies
Topic: How to clear the whole display?
Replies: 15
Views: 8110

Re: How to clear the whole display?

Sorry I meant to ask what 6502 system you are developing for.

I am unaware of a real 6502 that has its screen at $0200.
It would be a pity if you develop a game and it only runs on a PC in a simulator.

Obviously you are using a simulator or emulator, which one is this?

André

No I am not even ...
by Nabir14
Sat Aug 03, 2024 6:16 pm
Forum: Newbies
Topic: How to clear the whole display?
Replies: 15
Views: 8110

Re: How to clear the whole display?

BigEd wrote:
Welcome, Nabir14!

I wouldn't be surprised to learn that you're using easy6502 by Nick Morgan:
https://skilldrick.github.io/easy6502/#first-program
I am absolutely :)
by Nabir14
Sat Aug 03, 2024 9:52 am
Forum: Newbies
Topic: How to clear the whole display?
Replies: 15
Views: 8110

Re: How to clear the whole display?

Great you managed to fix it! First steps into a new world!

What you haven't told us (or I missed it), what system are you working on/for?

André

I am learning assembly languages and I wanted to use an assembly language where accessing the display is very easy so I can draw graphics on it. To ...
by Nabir14
Sat Aug 03, 2024 9:43 am
Forum: Newbies
Topic: How to clear the whole display?
Replies: 15
Views: 8110

Re: How to clear the whole display?

An additional comment:

You do an operation that sets the flags, then do some other operations, and only then check the flag.
When you further work with the code, it is easy to forget about that and insert other operations that change the flags. For example, if you want to change the loop to invert ...
by Nabir14
Sat Aug 03, 2024 9:41 am
Forum: Newbies
Topic: How to clear the whole display?
Replies: 15
Views: 8110

Re: How to clear the whole display?

fachat wrote:
I think John's code has an issue in that he changed the value of A to $00 instead of X - this should have been changed to $00.
Yes you are correct thanks for telling. I almost forgot that LDX is used for position.
by Nabir14
Sat Aug 03, 2024 9:40 am
Forum: Newbies
Topic: How to clear the whole display?
Replies: 15
Views: 8110

Re: How to clear the whole display?

Can you see why your code doesn't work? It's worth spending a little time walking through it yourself instruction by instruction to see exactly what it's doing, and think about how that differs from what you expected.

Spoilers below:

I assume you have a 32x32 display, with each pixel being ...
by Nabir14
Sat Aug 03, 2024 9:18 am
Forum: Newbies
Topic: How to clear the whole display?
Replies: 15
Views: 8110

Re: How to clear the whole display?

Can you see why your code doesn't work? It's worth spending a little time walking through it yourself instruction by instruction to see exactly what it's doing, and think about how that differs from what you expected.

Spoilers below:

I assume you have a 32x32 display, with each pixel being ...
by Nabir14
Sat Aug 03, 2024 6:31 am
Forum: Newbies
Topic: How to clear the whole display?
Replies: 15
Views: 8110

How to clear the whole display?

I am new to 6502 programming. I wanted to make a game using this assembly language. My first program fills the whole display with white pixels.
Code:

ldx #$ff
lda #$01
drawPixel:
dex
cpx #$00
sta $0200,x
sta $0300,x
sta $0400,x
sta $0500,x
bne drawPixel
brk

However it is not doing it ...