scarybeasts / beebjit

A very fast BBC Micro emulator.
Other
132 stars 15 forks source link

Feature Request - Toggle or Colour Surrounding Screen #31

Closed ajgbarnes closed 1 year ago

ajgbarnes commented 3 years ago

It would be a useful feature if it was possible to either switch of the border around the main BBC Micro screen or be able to colour it a different colour. Helps with grabbing screenshots of just the BBC Micro screen or determining where a pixel is being written (is it on the edge of the screen)?

ojwb commented 2 years ago

-opt video:border-chars=0 should turn off the border.

In MODE7 the cropped area captured is then one character too far left (thanks to correct emulation of 6845 skew I think).

scarybeasts commented 1 year ago

I saw this request and thought it would be fun. Image below of what MODE 3 looks like! The implementation isn't really border based, it's based on whether the video chip is rendering display pixels or blank.

Usage e.g. ./beebjit -opt video:background=aa5500

Screenshot 2022-11-29 at 3 21 40 PM
kieranhj commented 1 year ago

On a tangential note, I ended up implementing something similar in the branch kieranhj/debug-border-colour, albeit mapped to an address in the Beeb's memory. I.e. it was emulating a non-existent border colour register to allow raster timings without having to disrupt the main palette. Completely non-authentic but very helpful during the development of timing sensitive code...

ojwb commented 1 year ago

@kieranhj Kind of authentic actually - at least there was a real hardware implementation: https://mdfs.net/Info/Comp/BBC/Border/

kieranhj commented 1 year ago

Ah nice, I never knew about that hw. So my hack would work as-is if you set the 'register' address on the command line to &FE22.

ajgbarnes commented 1 year ago

Thank you @ojwb that looks perfect!