micronona/CLAUDE.md

40 lines
1.3 KiB
Markdown
Raw Normal View History

2026-04-03 10:49:53 +02:00
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
**Mironona** is a retro computer emulator (targeting a 6809-based system) built with C# (.NET 10) and SDL2 via the `SDL2-CS` binding. The window renders at 320x180 (upscaled 3x to 960x540) using a CPU-side RGB24 framebuffer that is blitted each frame to an SDL streaming texture.
## Commands
```bash
# Build
dotnet build
# Run
dotnet run
# Build release
dotnet build -c Release
```
## Architecture
The project is currently a single-file bootstrap (`Program.cs`) with:
- **SDL2 init** — video subsystem, window (960x540 display), accelerated renderer with VSync
- **Framebuffer** — `byte[320*180*3]` in RAM (RGB24), uploaded each frame via `SDL_UpdateTexture` to a streaming texture
- **Main loop** — polls SDL events (Quit / Escape to exit), then uploads framebuffer and presents
The comment `// Hier später: 6809-Schritt, VSync-Flag setzen, etc.` marks where the 6809 CPU step and VSync logic will be inserted.
## Key Constants
| Name | Value | Notes |
|---|---|---|
| `ScreenWidth` | 320 | Native framebuffer width |
| `ScreenHeight` | 180 | Native framebuffer height |
| Display scale | 3x | Window is 960x540 |
| Pixel format | `SDL_PIXELFORMAT_RGB24` | 3 bytes/pixel |