Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This problem continues our investigation of the memory pattern of hi-res graphics storage in the Commodore 64 computer from the previous week. We have already

This problem continues our investigation of the memory pattern of hi-res graphics storage in the Commodore 64 computer from the previous week. We have already learned that the 320 x 200 pixel display is subdivided into cells of 8x8 pixels each and how to convert (x,y) pixel coordinates into (p,q) cell coordinates, consecutive cell numbers c and the relative pixel coordinates (a,b) within each cell.

We now turn to the problem of how pixel information is stored in (mapped to) video memory. We shall ignore color information in this problem; every pixel is represented by one bit, where 1 means the pixel is set, and 0 means the pixel is not set. In each cell, each row of 8 pixels is represented by one byte, counted from the top and starting at 0. Given a row and its byte, the high bit of that byte, also known as bit 7 (the one with positional value 2^(7)=128), represents the leftmost pixel in the row. Bit 6 represents the next pixel to the right after that, and so on. Bit 0 represents the rightmost pixel in the row. Here is an example of a cell and the bytes that describe it:

(picture is above)

.image text in transcribed

The bytes are stored consecutively in video memory in order of byte number and cell number: 1st byte of video memory: cell 0/byte 0 2nd byte of video memory: cell 0/byte 1 8th byte of video memory: cell 0 / byte 7 9th byte of video memory: cell 1 / byte 0, etc. By the offset of a byte in video memory we mean its position relative to the first byte. The offset of the first byte is 0, the offset of the second byte is 1, and so on. a) Write a formula that gives the offset for the byte that stores pixel (x,y) in terms of x and y. Build on the formulas derived in last weeks homework and show work. b) Which bit (0 to 7) of the byte that contains the information about pixel (x,y) controls whether pixel (x,y) is set? Give a formula for the bit number. Make sure to take into account that the high bit is on the left side.

4. This problem continues our investigation of the memory pattern ofhi-res graphics storage in the Commodore 64 computer from the previous week. We have already learned that the 320 x 200 pixel display is subdivided into cells of8x8 pixels each and how to convert (xy) pixel coordinates into (p,q) cell coordinates, consecutive cell numbers c and the relative pixel coordinates (a,b) within each cell. We now turn to the problem of how pixel information is stored in ("mapped to") video memory. We shall ignore color information in this problem; every pixel is represented by one bit, where 1 means the pixel is set, and 0 means the pixel is not set. In each cell, each row of 8 pixels is represented by one byte, counted from the top and starting at 0. Given a row and its byte, the high bit of that byte, also known as bit 7 (the one with positional value 2 128), represents the leftmost pixel in the row. Bit 6 represents the next pixel to the right after that, and so on. Bit 0 represents the rightmost pixel in the row. Here is an example of a cell and the bytes that describe it: bit pos. value: 12864 32 16 8 4 2 1 byte #" value in this example 0, 34 1, 127 2, 73 3, 127 4, 65 5, 65 6, 127 7, 28 4. This problem continues our investigation of the memory pattern ofhi-res graphics storage in the Commodore 64 computer from the previous week. We have already learned that the 320 x 200 pixel display is subdivided into cells of8x8 pixels each and how to convert (xy) pixel coordinates into (p,q) cell coordinates, consecutive cell numbers c and the relative pixel coordinates (a,b) within each cell. We now turn to the problem of how pixel information is stored in ("mapped to") video memory. We shall ignore color information in this problem; every pixel is represented by one bit, where 1 means the pixel is set, and 0 means the pixel is not set. In each cell, each row of 8 pixels is represented by one byte, counted from the top and starting at 0. Given a row and its byte, the high bit of that byte, also known as bit 7 (the one with positional value 2 128), represents the leftmost pixel in the row. Bit 6 represents the next pixel to the right after that, and so on. Bit 0 represents the rightmost pixel in the row. Here is an example of a cell and the bytes that describe it: bit pos. value: 12864 32 16 8 4 2 1 byte #" value in this example 0, 34 1, 127 2, 73 3, 127 4, 65 5, 65 6, 127 7, 28

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

Discuss how selfesteem is developed.

Answered: 1 week ago