Comments (2)
As discussed on Discord, a relevant feature would be support of 4-bit data (NCM mode).
- DMA shall be able to read data in 4-bit-per-pixel mode, supporting selection of NCM nibble order and 4bpp Sprite nibble order
- Transparency, if enabled, shall test for (nibble) value zero and stop pixel output before any other step (i.e. before adding a value)
- DMA shall allow to either expand data to 8bpp (NCM), allowing to ADD values like above.
This is meant (to "colorize" using "16-color-chunks" of the palette, similar like NCM mode supporting 16 palettes, just with extra flexibility to allow non-16-entry aligned sub-palettes. - or keep data as 4bpp (NCM) and write-out nibble-wise data (in NCM nibble order).
This is meant to support "3D drawing" like OutRun, Lotus, Star Fox, Stunt Car Racer using up to 16 colors, while keeping enough RRB cycles for overlays and RRB Sprites to enhance the visuals. - For constant source value mode, the two nibbles shall be used individually, still allowing Addition (to achieve values > 15 for FCM output) and NCM output, along with transparency check on nibble-level as described above.
Use-case are "shadows" like done in Star Fox and other early 3D (simulated by alternating color and transparency laid out in checkerboard pattern) and dithered colors (expanding number of possibly shades)
We should use a new NCM_MODE (or 4BPP_MODE) with three bits for this,
where one bit is 4BPP_ENABLE (enabling this mode), one bit is SPRITE_ORDER_ENABLE (enabling Sprite-nibble order for read), one bit is 4BPP_OUTPUT_ENABLE (enabling write to NCM-order nibbles)
Default for this mode should be $00, i.e. disabled.
from mega65-core.
Two more modes, which are POSSIBLY "out of scope" because it's not "feeling" like 8/16bit function:
- Lookup-Table (LUT) indirection using 256-byte table located in memory, allowing manipulation like DOOM does for lighting/darkening of sectors/based on distance.
- "2D Tile Wraparound" mode, basically allowing to specify NxM tile-size (both being powers of two, 8x8 being minimum),
where source addressing would wrap-around when X / Y "value" would run over the edge.
Since the DMA works w/o explicit X/Y coordinates, just a single address, this mode shall assume that a "2D tile" starts with least bits being zero (i.e. in 8x8 Bytes case, which is same as FCM or NCM char btw), each "2D tile" would start at address which is multiple of 64 Bytes (i.e. the last 6 bits can be masked, X-address is lower 3 bits, Y-address is upper 3 bits).
Allowed range for each dimension would be 8-256, powers of two (6 combinations, i.e. 4bits per dimension).
Adding a "disabled" value of zero could be default, still fit into 4bits per combination (and make wrapping only in one dimension possible, which could be useful).
Idea is to be able to combine this with (source) Line-DMA for textured floors (like DOOM does, where texture is 64x64)
from mega65-core.
Related Issues (20)
- MEGA65 R7 Change Request Marshalling Point HOT 4
- A few modern C64 carts not detected as C64 carts by core selector HOT 50
- MEGAFLASH: refactor low level flashing interface HOT 1
- MEGAFLASH: Slot 0 flashing might still leave system broken HOT 3
- Etherload run&continue mode
- HYPERRAM: production_test fails with release-0.96 candidate HOT 4
- Hardware math division: 5211/193 > 27 HOT 10
- CONFIGURE: MAC address typed in is not correctly mangled HOT 4
- CONFIGURE: POWER-CYCLE screen has color issue on VGA only HOT 8
- RRB sprite number count limited because of colour ram wrap-around. HOT 6
- RTS immediate mode instruction completely broken HOT 1
- rel-build: various changes and enhancements
- Direct drive audio DAC has unusual stepwise behaviors in a test case HOT 2
- RRB Reverse Y-row adjust HOT 2
- Set GotoX Rowmask changes colour palette in use for rendering
- Allow connection of cellular modem to Nexys4 PSRAM
- R3/R3A Cannot boot if amplifier I2C is faulty HOT 1
- SDRAM controller intermittant problems HOT 29
- Background D020 updates late after raster interrupt? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mega65-core.