Add real video base address instead of computed one (with bounds)

This commit is contained in:
Laurent Vivier 2004-02-21 01:47:02 +00:00
parent fcd67e5680
commit 67195aad96
4 changed files with 23 additions and 9 deletions

View File

@ -8,9 +8,11 @@
#include "glue.h"
#include "console.h"
#include "MMU.h"
typedef struct console_handler {
unsigned char* video;
unsigned char* base;
unsigned long row_bytes; /* in bytes */
unsigned long depth; /* 8, 16 or 32 */
@ -284,7 +286,8 @@ console_init()
&console.row_bytes,
&console.width,
&console.height,
&console.depth);
&console.depth,
(unsigned long*)&console.video);
console.pos_x = 0;
console.pos_y = 0;
@ -382,3 +385,8 @@ unsigned long console_get_height()
{
return console.height;
}
unsigned long console_get_video()
{
return (unsigned long)console.video;
}

View File

@ -17,6 +17,6 @@ extern unsigned long console_get_videobase();
extern unsigned long console_get_row_bytes();
extern unsigned long console_get_depth();
extern unsigned long console_get_width();
extern unsigned long console_get_height();
extern unsigned long console_get_video();
#endif

View File

@ -16,7 +16,7 @@
* void
* glue_display_properties(unsigned long *base, unsigned long *row_bytes,
* unsigned long *width, unsigned long *height,
* unsigned long *depth)
* unsigned long *depth, unsigned long* video)
*/
glue_display_properties:
@ -28,9 +28,9 @@ glue_display_properties:
link.w %a6,#-4
movm.l #0x3c,-(%sp)
move.l 8(%a6),%a3
move.l 12(%a6),%a5
move.l 24(%a6),%a4
move.l 28(%a6),%a3 /* unsigned long *video */
move.l 12(%a6),%a5 /* unsigned long *row_bytes */
move.l 24(%a6),%a4 /* unsigned long *depth */
/* hdl = LMGetMainDevice(); */
@ -59,7 +59,7 @@ glue_display_properties:
tst.l (%a0)
jbeq .exit
/* *base = (unsigned char *)pm->baseAddr; */
/* *video = (unsigned char *)pm->baseAddr; */
move.l -4(%a6),%a0
move.l (%a0),(%a3)
@ -104,7 +104,13 @@ glue_display_properties:
move.l %d0,(%a4)
.not_15:
/* (*base) += pm->bounds.top * *row_bytes; */
/* (*base) = (*video) */
move.l (%a3),%d0
move.l 8(%a6),%a3 /* unsigned long *base */
move.l %d0,(%a3)
/* (*base) = (*video) + pm->bounds.top * *row_bytes; */
move.l -4(%a6),%a0
move.w 6(%a0),%d0

View File

@ -7,5 +7,5 @@
extern void glue_display_properties(unsigned long *base,
unsigned long *row_bytes,
unsigned long *width, unsigned long *height,
unsigned long *depth);
unsigned long *depth, unsigned long *video);
extern int Gestalt(unsigned long selector, long * response);