Not sure if this is the best sub-forum to post...
This is only an idea and I need some opinions on whether you think this would be a good thing or not.
The purpose of this is to have people be able to create 80s-90s styled games without having to worry about copyrights and such. The engine will be kinda like an emulator, but it will emulate a console that never existed. One of the big reasons I wanted to do this is how you program things with assembly language and how things behave when you are giving instructions directly to the processor. Sometimes I'm feeling that the PC's operating system is limiting your programming possibilities.
This is only a rough plan, but here is what I have planned out so far
8 bit processor
4kb of RAM
~3.50 MHz clock rate
16 bit program counter
supports bank switching
256x240 resolution
2 background layers (background/foreground)
4 tilemaps (nametables) 2 for background and 2 for foreground
tilemap mirroring setting.
12 palettes; 4 for sprites, 4 for background and 4 for foreground
each palette has 7 colors + alpha channel
color is defined by LLSS HHHH
H = hue
S = saturation (saturation 0 gives always grayscale regardless of hue)
L = lightness (or brightness)
Horizontal blank counter that can generate interrupts (similar to scanline interrupt found on some memory mappers on NES games)
256 different 8x8 sprites in memory at once
256 different 8x8 tiles in memory at once (shared for background and foreground)
CHR RAM
max 64 8x8 sprites on screen at once
no colors/sprites per scanline limitations
sprites can be layered either below, between or on top of the tilemaps
8 channels
4 generators and 2 sample players and 2 waveshape players
generators can produce sine, pulse, saw or noise
different 'timbre' settings (sine and saw gets inverted, while pulse has pulse width and noise has either white or "gate" noise)
note periods are read from built in lookup table (coarse pitch)
fine pitch is given to a second register as a signed value
sample players can play samples as 1 - 4 bit delta samples depending on the channel settings
samples can be pitched from -7 to +8 semitones
waveshape players play a custom waveshape
waveshape can be either 8, 16, 24 or 32 units long
The instruction set is mostly based around the 6502 instruction set. Some new instructions that will be added are here:
There's probably going to be a lot more instructions as the 6502 set has a lot of 'unofficial/illegal' instructions which are the ones begin replaced.
What do you think of this whole project? I'm trying to make the engine to be somewhere between the 8 bit and 16 bit consoles in terms of processing power and functions and such. On this early stage of the whole project, feedback is really important. Are there anything you think I should add, remove or modify a bit?
This is only an idea and I need some opinions on whether you think this would be a good thing or not.
What's the purpose?
The purpose of this is to have people be able to create 80s-90s styled games without having to worry about copyrights and such. The engine will be kinda like an emulator, but it will emulate a console that never existed. One of the big reasons I wanted to do this is how you program things with assembly language and how things behave when you are giving instructions directly to the processor. Sometimes I'm feeling that the PC's operating system is limiting your programming possibilities.
What will this 'console' be like?
This is only a rough plan, but here is what I have planned out so far
Processor
8 bit processor
4kb of RAM
~3.50 MHz clock rate
16 bit program counter
supports bank switching
Graphics
256x240 resolution
2 background layers (background/foreground)
4 tilemaps (nametables) 2 for background and 2 for foreground
tilemap mirroring setting.
12 palettes; 4 for sprites, 4 for background and 4 for foreground
each palette has 7 colors + alpha channel
color is defined by LLSS HHHH
H = hue
S = saturation (saturation 0 gives always grayscale regardless of hue)
L = lightness (or brightness)
Horizontal blank counter that can generate interrupts (similar to scanline interrupt found on some memory mappers on NES games)
256 different 8x8 sprites in memory at once
256 different 8x8 tiles in memory at once (shared for background and foreground)
CHR RAM
max 64 8x8 sprites on screen at once
no colors/sprites per scanline limitations
sprites can be layered either below, between or on top of the tilemaps
Audio
8 channels
4 generators and 2 sample players and 2 waveshape players
generators can produce sine, pulse, saw or noise
different 'timbre' settings (sine and saw gets inverted, while pulse has pulse width and noise has either white or "gate" noise)
note periods are read from built in lookup table (coarse pitch)
fine pitch is given to a second register as a signed value
sample players can play samples as 1 - 4 bit delta samples depending on the channel settings
samples can be pitched from -7 to +8 semitones
waveshape players play a custom waveshape
waveshape can be either 8, 16, 24 or 32 units long
Instruction set
The instruction set is mostly based around the 6502 instruction set. Some new instructions that will be added are here:
Code:
SSB ; Store set bits. Stores only set bits of the value in accumulator to the given memory address
; e.g. A = #%1010 0110
; $005E = #%1001 1100
; SSB $5E = #%1011 1110
; useful for setting bit flags in variables/registers
SCB ; Store clear bits. Works with the same idea as SSB, but stores only cleared bits.
; e.g. A = #%1010 0110
; $005E = #%1001 1100
; SCB $5E = #%1000 0110
PHX/PHY ; Push X/Y register
PLX/PLY ; Pull X/Y register
TXY/TYX ; Transfer X to Y/Y to X
WAI ; Wait for interrupt
SWI ; Software interrupt (replaces BRK as it seems to generate interrupt)
; e.g. A = #%1010 0110
; $005E = #%1001 1100
; SSB $5E = #%1011 1110
; useful for setting bit flags in variables/registers
SCB ; Store clear bits. Works with the same idea as SSB, but stores only cleared bits.
; e.g. A = #%1010 0110
; $005E = #%1001 1100
; SCB $5E = #%1000 0110
PHX/PHY ; Push X/Y register
PLX/PLY ; Pull X/Y register
TXY/TYX ; Transfer X to Y/Y to X
WAI ; Wait for interrupt
SWI ; Software interrupt (replaces BRK as it seems to generate interrupt)
There's probably going to be a lot more instructions as the 6502 set has a lot of 'unofficial/illegal' instructions which are the ones begin replaced.
What do you think of this whole project? I'm trying to make the engine to be somewhere between the 8 bit and 16 bit consoles in terms of processing power and functions and such. On this early stage of the whole project, feedback is really important. Are there anything you think I should add, remove or modify a bit?