6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 8:50 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Kestrel-2 Updates
PostPosted: Sat Jan 19, 2008 6:56 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Well, I've been hacking on my Kestrel-2 emulated environment again. I'm finding the Forth firmware image to be extremely buggy. The bugs didn't manifest themselves until fairly recently, as I was attempting to write Forth storage drivers.

Oh, I also have implemented the first (emulated) SerBus peripheral for the Kestrel, too -- a 64MB capacity direct access storage device (DASD) with 1024-byte 'sectors.' In other words, it's purpose-built for Forth.

However, I'm finding that the Forth image in ROM has entirely too many bugs for my liking, so I'm planning on starting the Forth environment over yet again. I've also been considering ditching Forth in favor of another language, such as a small Lisp environment. An APL-inspired language is also not outside the question.

Currently, I'm working on some ROM-resident code to implement a nice graphical operating system. My current inspiration is GEOS/64, where I've just finished implementing the HorizontalLine clone. However, there are some differences from the GEOS code:

1) my code is MUCH faster than the GEOS code. It's completely 16-bit for starters, and also does a lot less work inside its inner loops.

2) my code supports drawing into off-screen bitmaps and even sub-bitmaps (a bitmap within a larger bitmap), which makes implementing course-grained windowing a cinch.

3) All parameters are passed on the stack, so there are no global direct-page locations used by the code.

UPDATE Below is a screenshot. Here is the code that was used to produce that screenshot:

Code:
.import drawHorizontalLineFrom_to_onRow_usingPattern_onBitmap_
.proc stupidDialogBox
    pea solidBlackPattern
    pea frameBufferBitmap
    pea 288+8
    pea 576+8
    pea 96+8
    pea 64+8
    jsl drawFilledRectangleFrom_to_onBitmap_withPatternBitmap_

    pea solidBlackPattern
    pea frameBufferBitmap
    pea 288
    pea 576
    pea 96
    pea 64
    jsl drawFilledRectangleFrom_to_onBitmap_withPatternBitmap_

    pea solidWhitePattern
    pea frameBufferBitmap
    pea 287
    pea 575
    pea 97
    pea 65
    jsl drawFilledRectangleFrom_to_onBitmap_withPatternBitmap_

    pea solidBlackPattern
    pea frameBufferBitmap
    pea 284
    pea 572
    pea 100
    pea 68
    jsl drawFilledRectangleFrom_to_onBitmap_withPatternBitmap_

    pea solidWhitePattern
    pea frameBufferBitmap
    pea 281
    pea 569
    pea 103
    pea 71
    jsl drawFilledRectangleFrom_to_onBitmap_withPatternBitmap_

    clc
    tsc
    adc #60
    tcs
    rts
.endproc

    .rodata

frameBufferBitmap:
    .word 0, $FE
    .word 480
    .word 40
    .word 640

backdropPattern:
    .word backdropPattern_bits, 0
    .word 4
    .word 1
    .word 16

backdropPattern_bits:
    .word $AAAA, $5555, $AAAA, $5555


solidBlackPattern:
    .word solidBlack_bits, 0
    .word 1
    .word 1
    .word 16

solidBlack_bits:
    .word $0000

solidWhitePattern:
    .word solidWhite_bits, 0
    .word 1
    .word 1
    .word 16

solidWhite_bits:
    .word $FFFF


Code:
Broken external image link
http://www.falvotech.com/tmp/screenshot-dialog-2.png

This is generated by alternating between $AAAA and $5555 for the pattern when filling the whole screen. Then, I used $0000 to render the dropshadow, and finally $FFFF for the white index card.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: GARTHWILSON and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: