This patch sets the value frame-buffer-adr to the address of the frame buffer.
This code below is what I used to test this patch.
: video-test { value } ( x -- ) 100000 0 do value frame-buffer-adr i + ! loop ;
When I ran it like this:
0 video-test the screen changes to a black color. This happens on both on Apple's Open Firmware and in OpenBIOS.
signed-off-by: John Arbuckle programmingkidx@gmail.com
Index: packages/video.c =================================================================== --- packages/video.c (revision 1077) +++ packages/video.c (working copy) @@ -338,7 +338,8 @@ } video.has_video = 1; video.pal = malloc( 256 * sizeof(unsigned long) ); - + PUSH(video.fb.mphys); + feval("to frame-buffer-adr"); #if defined(CONFIG_OFMEM) && defined(CONFIG_DRIVER_PCI) size = ((video.fb.h * video.fb.rb) + 0xfff) & ~0xfff;