mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-22 10:29:31 +00:00
Add real video base address instead of computed one (with bounds)
This commit is contained in:
parent
fcd67e5680
commit
67195aad96
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user