Andrew Park wrote:
I can't remember for the life of me how mode 1 is mapped out where is the
start address of the screen and where is the attribute data stored

Start address of the screen will depend which page you have set as the video page (VMPR). Mode 1 will only use the first 6912 bytes of the video page.

The screen is split up into three 2K chunks, each holding a third of the screen. Each chunk consists of 64 32byte rows, but the row order matches the ZX Spectrum screen layout - 1st row, 9th row, 17th row.... 57th row.. then 2nd row, 10th, 18th row.... like Thomas just said in his reply.

The Attributes consist of 768 bytes, which begin at +6144 bytes from the start address.

A simple test from BASIC, start the SAM and VMPR will be set to page 30, so in the BASIC memory map the start of the screen memory will be 507904.

POKE 507904, 255 will plot the 8 pixels in the start of the screen memory (top left), and then POKE 507904+6144,255 will fill the attributes for the first attribute square (top left).

A quick program that will slowly show you the layout:

10 MODE 1:CLS: FOR N=507904 to 507904+6911: POKE N, INT(RND*256): NEXT N

All the best,

Colin
=====
Quazar : Hardware, Software, Spares and Repairs for the SAM Coupé
1995-2011 - Celebrating 17 Years of developing for the SAM Coupé
Website: http://www.samcoupe.com/

Reply via email to