Re: Micro programmed 6502-like CPU
Posted: Sun Apr 05, 2020 11:28 am
that is some awesome progress!
but i think it's time for a test image, something complete you can throw at it that you know how it's supposed to look so you can see if it actually works as it should.
but before i can go into detail i kinda need to clearify how (i think) the drawing works.
basically you're throwing a 256x128px image at the screen, but only a 200x128px part of that is actually visible. (technically this means you could "easily" implement smooth horizontal scrolling)
so what you need is a Binary file that contains pixel data (1 bit per pixel) for a whole 256x128 image, so it lines up with the screen.
anways, to the process i went through to make this:
using GIMP i made an image 256x128, marked the 200px point so i know where the screen ends, and changed the mode to 1 bit indexed color mode. which only gives me Black and White but that is all i need.
i then drew this image: you can see the arrows in the corners, that is where i expect the visible screen to be.
I just threw random things at it to test basically everything you would ever want to throw on the screen. (aside from interactive/moving stuff)
I then exported the image as a XBM File. this basically takes the whole data of the image and converts it into a C compatible Array, with each line of 8 pixels (from top left to bottom right) being listed as a byte.
though note 2 important notes about that.
1. GIMP stores white pixels as 0, and black pixels as 1.
2. GIMP stores the byte in reverse order. so the order of the pixels on screen from left to right is: 0 1 2 3 4 5 6 7. and they get stored reversed to that as: 7 6 5 4 3 2 1 0
using that Array i extracted the pure data from it via Notepad++ and some search&replace functions (removing spaces, 0x-prefixes, commas, etc) and loaded that into my simulated VGA circuit
and this was the result: pretty good i'd say.
i also converted this image to a pure binary format. so that you can try it out yourself. (i hope your EEPROM programmer supports .BIN files, it should)
I actually made 2 files. one has just all bits in each byte in inverted order.
because i don't know the order that you put bits on the screen.
which do you do?
is the first bit (bit 0) of the byte drawn first on the screen, or is the last bit (bit 7) drawn first?
if it's the first bit you basically need to mirror all your text/letters/symbols that you want to display.
anyways, here the files:
bit 0 first
bit 7 first
but i think it's time for a test image, something complete you can throw at it that you know how it's supposed to look so you can see if it actually works as it should.
but before i can go into detail i kinda need to clearify how (i think) the drawing works.
basically you're throwing a 256x128px image at the screen, but only a 200x128px part of that is actually visible. (technically this means you could "easily" implement smooth horizontal scrolling)
so what you need is a Binary file that contains pixel data (1 bit per pixel) for a whole 256x128 image, so it lines up with the screen.
anways, to the process i went through to make this:
using GIMP i made an image 256x128, marked the 200px point so i know where the screen ends, and changed the mode to 1 bit indexed color mode. which only gives me Black and White but that is all i need.
i then drew this image: you can see the arrows in the corners, that is where i expect the visible screen to be.
I just threw random things at it to test basically everything you would ever want to throw on the screen. (aside from interactive/moving stuff)
I then exported the image as a XBM File. this basically takes the whole data of the image and converts it into a C compatible Array, with each line of 8 pixels (from top left to bottom right) being listed as a byte.
though note 2 important notes about that.
1. GIMP stores white pixels as 0, and black pixels as 1.
2. GIMP stores the byte in reverse order. so the order of the pixels on screen from left to right is: 0 1 2 3 4 5 6 7. and they get stored reversed to that as: 7 6 5 4 3 2 1 0
using that Array i extracted the pure data from it via Notepad++ and some search&replace functions (removing spaces, 0x-prefixes, commas, etc) and loaded that into my simulated VGA circuit
and this was the result: pretty good i'd say.
i also converted this image to a pure binary format. so that you can try it out yourself. (i hope your EEPROM programmer supports .BIN files, it should)
I actually made 2 files. one has just all bits in each byte in inverted order.
because i don't know the order that you put bits on the screen.
which do you do?
is the first bit (bit 0) of the byte drawn first on the screen, or is the last bit (bit 7) drawn first?
if it's the first bit you basically need to mirror all your text/letters/symbols that you want to display.
anyways, here the files:
bit 0 first
bit 7 first