First attempt at M2MF. It sucks

This commit is contained in:
starfrost013
2025-08-12 23:30:27 +01:00
parent e7f63f6df2
commit 12a56203fa
6 changed files with 141 additions and 72 deletions

View File

@@ -124,12 +124,8 @@ typedef enum nv3_pgraph_class_e
#define NV3_M2MF_FORMAT 0x0324
// M2MF formats (IN and OUT ORed together)
#define NV3_M2MF_FORMAT_INPUT_INC_1 0x1
#define NV3_M2MF_FORMAT_INPUT_INC_2 0x2
#define NV3_M2MF_FORMAT_INPUT_INC_4 0x4
#define NV3_M2MF_FORMAT_OUTPUT_INC_1 0x100
#define NV3_M2MF_FORMAT_OUTPUT_INC_2 0x200
#define NV3_M2MF_FORMAT_OUTPUT_INC_4 0x400
#define NV3_M2MF_FORMAT_INPUT 0
#define NV3_M2MF_FORMAT_OUTPUT 8
#define NV3_M2MF_NOTIFY 0x0328
@@ -596,8 +592,8 @@ typedef struct nv3_object_class_00D
uint32_t offset_out;
uint32_t pitch_in;
uint32_t pitch_out;
uint32_t line_length_in; // Stride?
uint32_t line_count;
uint32_t scanline_length; // Stride?
uint32_t num_scanlines;
uint8_t format; // input increment 1 2 or 4, output increment 1 2 or 4 (represented by << 8)
uint32_t buffer_notify; // Notify the Buffedr
} nv3_memory_to_memory_format_t;

View File

@@ -58,4 +58,7 @@ void nv3_render_blit_screen2screen(nv3_grobj_t grobj);
/* GDI */
void nv3_render_gdi_transparent_bitmap(bool clip, uint32_t color, uint32_t bitmap_data, nv3_grobj_t grobj);
void nv3_render_gdi_1bpp_bitmap(uint32_t color0, uint32_t color1, uint32_t bitmap_data, nv3_grobj_t grobj); /* GDI Type-E: Clipped 1bpp colour-expanded bitmap */
void nv3_render_gdi_1bpp_bitmap(uint32_t color0, uint32_t color1, uint32_t bitmap_data, nv3_grobj_t grobj); /* GDI Type-E: Clipped 1bpp colour-expanded bitmap */
/* DMA */
void nv3_perform_dma_m2mf(nv3_grobj_t grobj);

View File

@@ -1054,10 +1054,10 @@ typedef struct nv3_pfb_s
#define NV3_NOTIFICATION_INFO_ADJUST 0 // Wut
#define NV3_NOTIFICATION_PT_PRESENT 16 // Determines if the pagetable exists.
#define NV3_NOTIFICATION_TARGET 24 // Determines where this notification goes
#define NV3_NOTIFICATION_TARGET_NVM 0 // VRAM target for DMA
#define NV3_NOTIFICATION_TARGET_CART 1 // "Cartridge" target for dma, only mentioned in a few places, !!! NV2 LEFTOVER !!!
#define NV3_NOTIFICATION_TARGET_PCI 2 // Send the data to the host system over PCI
#define NV3_NOTIFICATION_TARGET_AGP 3 // Send the data to the host system over AGP
#define NV3_DMA_TARGET_NODE_VRAM 0 // VRAM target for DMA
#define NV3_DMA_TARGET_NODE_CART 1 // "Cartridge" target for dma, only mentioned in a few places, !!! NV2 LEFTOVER !!!
#define NV3_DMA_TARGET_NODE_PCI 2 // Send the data to the host system over PCI
#define NV3_DMA_TARGET_NODE_AGP 3 // Send the data to the host system over AGP
#define NV3_NOTIFICATION_PAGE_IS_PRESENT 0 // Determines if the page really exists
#define NV3_NOTIFICATION_PAGE_ACCESS 1 // Determines the page access type