It is currently Tue Nov 19, 2019 8:36 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Jan 14, 2019 4:03 am 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 1025
On the IBM PC, 1984's Enhanced Graphics Adapter (EGA), and the backwards-compatible 1987 VGA chipset, have limited scroll and screen split support, though no sprites.


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 4:10 am 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 712
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
There is usually one sprite, for mouse cursor on most post VGA chipsets. Scrolling can be done by changing framebuffer start address, especially on things with VESA VBE support.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 6:06 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 1233
Location: Hokkaido, Japan
Oh I remember hearing about hardware scrolling in VGA video cards, only in one axis though.

I see, the mouse is a sprite. Better than nothing!


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 7:42 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21708
Location: NE Indiana, USA (NTSC)
Williams arcade PCBs and Atari Lynx handhelds didn't have sprites in the TMS9918 and VIC-II sense, but they did have a dedicated blitter unit that could draw pictures to a frame buffer. The PC adopted a blitter architecture beginning with IBM 8514 and S3 86C911, and a 2D GPU (sometimes branded a "Windows accelerator") became a standard feature on most PC video cards by 1995.

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 10:48 am 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 1025
No, both the 1984 EGA and 1987 VGA allow full diagonal scrolling, by specifying an X size larger than the screen width. The only limitation on both is that the split screen feature is limited on both in that the scrolling area must be the top one, and the fixed area the bottom one. That is why the PC version of Pinball Fantasies puts the scoreboard at the bottom, while the original Amiga version put it at the top of the screen. Another limitation that only exists on EGA and was lifted on VGA is that the fine X scroll carries over into the fixed split region.

The standard EGA and VGA cards have no provision for a hardware mouse cursor. As for later graphics cards, since the VESA Video BIOS Extensions provided no software interface for a hardware mouse cursor, any program using it would be card-model-specific. The Tseng ET3000 for example had the hardware cursor; for the more popular successor model ET4000, Tseng Labs apparently grew tired of that toy and removed it.


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 10:59 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8690
Location: Seattle
Pokun wrote:
Oh I remember hearing about hardware scrolling in VGA video cards, only in one axis though.
Not only one axis.

They are split across multiple registers, one for sub-tile* horizontal scrolling ("3C0h index 13h (R/W): Attribute: Horizontal PEL Panning Register"), one for sub-tile vertical scrolling ("3d4h index 8 (R/W): CRTC: Preset Row Scan Register"), and two for coarse scrolling ("3d4h index {C,D}h (R/W): CRTC: Start Address {High,Low} Register").

The sub-tile vertical scrolling register is only used in text or vertically stretched ("3d4h index 9 (R/W): CRTC: Maximum Scan Line Register") modes. Because of how the VGA works, fine horizontal scrolling requires sub-tile scrolling.

The coarse scrolling registers are present in the 6845 that was used in the CGA/MDA card too.

* A tile is 4, 8, or 9 pixels wide, depending on configuration. Kinda similar to the SNES, the VGA could either use a single 32-bit-wide RAM at 3MHz to generate four 8-bit pixels every 3MHz (→ pixel clock of 12.6MHz, 320 pixel mode); eight 4-bit pixels (25.2MHz), or split it in two for text modes (fetching a tile and attribute in one 16-bit slice, and then using that to look up a scanline's contents in the other 16-bit slice). A tile is anywhere between 1 to 32 pixels tall, and can additionally be doublescanned. The master pixel clock could either be 25 or 28MHz, and all cards seemed to consistently support a mild overclock (running at 3.5MHz instead of 3.15MHz)

The reference I used when VGA programming still mattered: https://pdos.csail.mit.edu/6.828/2006/r ... GAREGS.TXT

NewRisingSun wrote:
The Tseng ET3000 for example had the hardware cursor; for the more popular successor model ET4000, Tseng Labs apparently grew tired of that toy and removed it.
Newer SVGA cards seemed to consistently have one. Xfree86 called it "hardware mouse", and the majority of drivers seemed to support it. Only talking about "2d" cards, (edit) I don't know about anything from the past fifteen years.

edit: the ET4000 with the weitek32 accelerator did support a hardware cursor but it was strictly bilevel. There's a bit of other cruft in xfree86's driver that makes it hard to tell which cards supported what. Certainly in the final release, they dummied out support for everything but the hardware cursor on the ET6000.


Last edited by lidnariq on Sat May 04, 2019 6:25 pm, edited 6 times in total.

Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 12:19 pm 
Offline

Joined: Tue Oct 06, 2015 10:16 am
Posts: 996
HW cursors definitely exist in modern cards. It has plenty of benefits.


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 12:25 pm 
Offline
Formerly WheelInventor
User avatar

Joined: Thu Apr 14, 2016 2:55 am
Posts: 2030
Location: Gothenburg, Sweden
Yeah, you may experience delay or choppyness with software cursors.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 2:13 pm 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 1233
Location: Hokkaido, Japan
I see, so sprites are alive and kicking!

lidnariq wrote:
Pokun wrote:
Oh I remember hearing about hardware scrolling in VGA video cards, only in one axis though.
Not only one axis.

They are split across multiple registers, one for sub-tile* horizontal scrolling ("3C0h index 13h (R/W): Attribute: Horizontal PEL Panning Register"), one for sub-tile vertical scrolling ("3d4h index 8 (R/W): CRTC: Preset Row Scan Register"), and two for coarse scrolling ("3d4h index {C,D}h (R/W): CRTC: Start Address {High,Low} Register")...
Oh yeah, I think I mixed it up with scroll mirroring. I was told that the scroll mirroring orientation on VGA isn't changeable like on the NES.


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 2:22 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8690
Location: Seattle
scroll mirroring?

There isn't a concept of multiple nametables, if that's what you're referring to? Instead there's just a width for the source data, and a width & height for the viewport. Things don't usually work well if you specify a width narrower than the viewport.


Top
 Profile  
 
PostPosted: Mon Jan 14, 2019 5:30 pm 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 1233
Location: Hokkaido, Japan
From what I understood of what was explained to me some years ago, you could "scroll around" in VRAM, but due to how it's setup you could only scroll in a certain direction without the viewport or whatever wraps around or mirrors or something (sounded a lot like the NES scroll/nametable mirroring to me). I think it involved that problem with Pinball Fantasy though so it's entirely possible I misunderstood everything. :)


BTW when I make games for IBM-PC in C++, I made a 2D graphic engine that uses software sprites and background layers (tiled or non-tiled) drawed in order of set priority in a way that closely resembles these classic video chips (PPU, TMS9918, HuC6270 etc) but much more flexible and tweakable on per game-basis. I have no idea if this makes sense or is effective (memory-wise, speed-wise and ease of use), especially if a lot of sprites and backgrounds are used.

This calls for a separate thread though.


Top
 Profile  
 
PostPosted: Tue Jan 15, 2019 1:04 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 909
Location: Denmark (PAL)
Drew Sebastino wrote:
Metal Slug 2 says "hi" :lol:


The Metal Slug 2 slowdown is such an obscene example due to it being a pretty simple bug. Not sure about the details, but supposedly the game accidentally checks all collisions twice every frame.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 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:  
Powered by phpBB® Forum Software © phpBB Group