6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 20, 2024 10:52 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Simple dot
PostPosted: Fri Feb 01, 2019 5:20 pm 
Offline

Joined: Fri Nov 16, 2018 2:41 pm
Posts: 8
Hello. I'm trying to figure out how it is possible to display a single pixel anywhere on the screen. Do you write a value to a specific address? If you could do that in Easy6502, why can't you do it when writing code for an nes game?


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple dot
PostPosted: Fri Feb 01, 2019 5:41 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
In brief, there are many different ways of doing video. Mostly, RAM was rather expensive compared to the desired resolution, so you have more than one pixel controlled by a byte. But also, RAM is rather slow compared to video, so if one byte controlled one pixel, you'd need a great number of RAM accesses to fetch the video data.

So, it's more normal to see video modes where one byte controls 2, 4 or even 8 pixels. Or, in the case of a character-mode display, in a sense one byte controls 64 pixels.

Easy6502 is a simple model, and is written as software, so it can present a more user-friendly interface.


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple dot
PostPosted: Fri Feb 01, 2019 6:16 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1228
Location: Soddy-Daisy, TN USA
Also, keep in mind the NES only has 2K of RAM by default. Some carts added more RAM but as a general rule, you're working with a 2K system. In order to have single pixel access (especially in multiple colors), 2K of RAM would only support very small resolutions. Which is why the NES (and many 8-bit computers) worked in tiles (chars) and even meta-tiles (collections of tiles).

_________________
Cat; the other white meat.


Last edited by cbmeeks on Thu Feb 07, 2019 9:29 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Simple dot
PostPosted: Thu Feb 07, 2019 9:14 pm 
Offline

Joined: Tue Jul 24, 2012 2:27 am
Posts: 674
Also, the 1.79MHz 6502 speed is way too slow to draw NES style games on a framebuffer. If you were drawing a pixel at a time, you'd be getting seconds per frame instead of frames per second, which is not conducive to arcadey gameplay.

Consider the PPU to be a hardware decompressor from a compressed dictionary of tile/sprite/palette definitions into a streaming full-color video signal. This dictionary is the language that those sorts of games speak naturally, setting a byte (for instance) to change the position of a sprite, instead of all the effort of redrawing it in software pixel by pixel. Anything you wish to display needs to speak that language.

The easiest way to have a single byte show something on such a display is to change a tile, not to change a pixel.

If you want literally 1 pixel to show anywhere on the screen, define a sprite with 1 visible pixel, and position it by setting its X and Y coordinates.

_________________
WFDis Interactive 6502 Disassembler
AcheronVM: A Reconfigurable 16-bit Virtual CPU for the 6502 Microprocessor


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: