--- trunk/TODO 2007/10/08 16:20:58 32 +++ trunk/TODO 2007/10/08 16:21:17 34 @@ -1,8 +1,47 @@ -$Id: TODO,v 1.410 2006/11/06 05:32:38 debug Exp $ +$Id: TODO,v 1.453 2007/02/19 01:34:42 debug Exp $ -This file is my list of things I want to work on in the future. It is in -random order, and some parts of it are probably out-to-date by now. +------------------------------------------------------------------------------- +Fix after the 0.4.4 release: + Fix the PowerPC DECR interrupt speed! + +------------------------------------------------------------------------------- + +Possible (relatively large) work packages to concentrate on in the future: + + x) SMP: + Get SMP working again. It is pretty much broken since I started + the conversion from the old bintrans system to the new dyntrans system. + Add better Test machine demos for SMP in the demos directory. + + x) Network: + Redesign of the networking subsystem, at least the NAT translation + part. The current way of allowing raw ethernet frames to be + transfered to/from the emulator via UDP should probably be extended + to allow the frames to be transmitted other ways as well. + Also adding support for connecting ttys (either to xterms, or to + pipes/sockets etc, or even to PPP->NAT or SLIP->NAT :-). + + x) PCI: + Pretty much everything related to runtime configuration, device + slots, interrupts, whatever. The current code is very hardcoded + and ugly. + + x) Debugging: + Think more about SMP debugging, etc. Right now, the + debugger is a mess. Also, a better connection to GDB would be + very nice to have. + + x) Userland emulation: + Primary goals would be NetBSD and Linux syscall emulation. + +And of course, there are _LOTS_ of minor TODOs spread out throughout +the source code, which must be fixed sooner or later. + +------------------------------------------------------------------------------- + +Some other things, in random order, that I'd like to fix: (Some items in +this list are probably out-to-date by now.) Dyntrans: x) Instruction combination collisions? How to avoid easily... @@ -36,11 +75,14 @@ (containing code) x) 16-bit encodings? (MIPS16, ARM Thumb, 32-bit SH on SH64) x) Lots of other stuff: see src/cpus/README_DYNTRANS - x) true recompilation backend? think carefully about this, - experiment in a separate project (not in GXemul) - o) First test would be to just implement a simple - instruction such as MIPS' addiu or lui, on AMD64 - hosts... + x) true recompilation backend? think carefully about this. + o) abstract syntax for emitting opcopdes + o) convert into native code only after an entire + block has been translated? probably best. + o) x86/amd64 code generator can be very similar... perhaps + o) branches to already translated code blocks can + link the blocks together + o) load/store are the most important. Simple Valgrind-like checks? o) Mark every address with bits which tell whether or not the address @@ -86,47 +128,58 @@ x) watchhi/watchlo exceptions, and other exception handling details o) R10000 and others: (R12000, R14000 ?) + x) The code before the line + /* reg[COP0_PAGEMASK] = cpu->cd.mips.coproc[0]->tlbs[0].mask & PAGEMASK_MASK; */ + in cpu_mips.c is not correct for R10000 according to + Lemote's Godson patches for GXemul. TODO: Go through all + register definitions according to http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/hdwr/bks/SGI_Developer/books/R10K_UM/sgi_html/t5.Ver.2.0.book_263.html#HEADING334 + and make sure everything works with R10000. + Then test with OpenBSD/sgi? x) memory space, exceptions, ... x) use cop0 framemask for tlb lookups (http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/hdwr/bks/SGI_Developer/books/R10K_UM/sgi_html/t5.Ver.2.0.book_284.html) SuperH: - x) DMA (0xffa00000) - x) Instruction tracing should include symbols for branch targets, - and so on... x) SH4 interrupt controller: x) Implement correct priorities of interrupts + x) SH4 DMA (0xffa00000) + x) SH4 UBC (0xff200000) + x) Store queues can copy 32 bytes at a time, there's no need to + copy individual 32-bit words. (Performance improvement.) x) SH4 BSC (Bus State Controller) + x) SH4 RTC: Read the host's clock. + x) SH4 SCIF: Serial _interrupts_ + x) Instruction tracing should include symbols for branch targets, + and so on, to make the output more human readable. x) NetBSD/evbsh3, dreamcast, mmeye, hpcsh! Linux? x) Replace pc-relative loads with immediate load, if within the same page. (Similar to the same optimization for ARM.) - x) Floating point exception correctness. x) Floating point speed! + x) Floating point exception correctness. x) Think carefully about how to implement SH5/SH64 (for evbsh5). Dreamcast: - x) CD image bootup: - 0) Find IP.BIN, and load it to 0x8c008000. - 1) Run code at 0x8c008300 (SEGA license code). - 2) When the license code runs a "boot menu" syscall, - load the 1ST_READ.BIN file (unscrambled?) to 0x8c010000. - 3) Run code at 0x8c00b800 (Bootstrap 1). This will in turn - jump to 0x8c00e000 (Bootstrap 2), and then jump to - 0x8c010000, to start the program. - (Try with e.g. Comstedt's Serial IP Slave, to make sure it - works as expected.) - x) LAN adapter. + x) G2 DMA + x) LAN adapter (dev_mb8696x.c). NetBSD root-on-nfs. x) PVR: Lots of stuff. See dev_pvr.c. + x) GDROM + x) Modem + x) PCI bridge/bus? x) Maple bus: x) Correct controller input x) Mouse input - x) PROM/BIOS calls: - x) GD-ROM emulation - x) NetBSD/dreamcast: Root on nfs? + x) Software emulation of BIOS calls: + x) GD-ROM emulation: Use the GDROM device. + x) Use the VGA font as a fake ROM font. (Better than + nothing.) x) Linux/dreamcast? (The gentoo kernel currently crashes.) + x) Make as many as possible of the KOS examples run! x) More homebrew demos/games. - x) Sound emulation (ARM cpu). - x) VME processor emulation? + x) SPU: Sound emulation (ARM cpu). + x) VME processor emulation? "(Sanyo LC8670 "Potato")" according to + Wikipedia, LC86K87 according to Comstedt's page. See + http://www.maushammer.com/vmu.html for a good description of + the differences between LC86104C and the one used in the VME. Transputer: x) Implement support for Helios binaries. @@ -170,7 +223,7 @@ SPARC: o) Implement Adress space identifiers; load/stores etc. - o) Save/restore register windows etc! + o) Save/restore register windows etc! Both v9 and pre-v9! o) Finish the subcc and addcc flag computation code. o) Add more registers (floating point, control regs etc) o) Exception/trap handling. @@ -187,6 +240,8 @@ o) Try to make the debugger more modular and, if possible, reentrant! o) Remove the emul command? (But show network info if showing machines?) + o) Evaluate expressions within []? That would allow stuff like + cpu[x] where x is an expression. o) Settings: x) Special handlers for Write! +) MIPS coproc regs @@ -196,8 +251,7 @@ o) see src/debugger.c for more POWER/PowerPC: - x) find and fix the bug which causes NetBSD/macppc to fail after - an install! + x) Fix DECR timer speed, so it matches the host. x) NetBSD/prep 3.x triggers a possible bug in the emulator: @@ -221,10 +275,18 @@ x) Floating point exception correctness. x) Alignment exceptions. +PReP: + Clock time! ("Bad battery blah blah") + Algor: o) Other models than the P5064? o) PCI interrupts... needed for stuff like the tlp NIC? +BeBox: + o) Interrupts. There seems to be a problem with WDC interrupts + "after a short while", although a few interrupts get through? + o) Perhaps find a copy of BeOS and try it? + HPCmips: x) Mouse/pad support! :) x) A NIC? (As a PCMCIA device?) @@ -232,28 +294,24 @@ AVR: o) Everything. -AVR32: - o) Everything. It would be good if there was NetBSD/avr32 to - experiment with... - ARM: o) See netwinder_reset() in NetBSD; the current "an internal error occured" message after reboot/halt is too ugly. o) ARM "wait"-like instruction? - o) try to get netbsd/evbarm 3.x running (iq80321) + o) try to get netbsd/evbarm 3.x or 4.x running (iq80321) o) make the xscale counter registers (ccnt) work o) make the ata controller usable for FreeBSD! - o) zaurus for openbsd... - o) debian/cats crashes because of unimplemented coproc stuff. + o) Zaurus emulation, for e.g. OpenBSD/zaurus + o) Debian/cats crashes because of unimplemented coproc stuff. fix this? Test machines: - + dev_fb block fill and copy - + dev_fb draw characters (from the built-in font)? - + dev_fb input device? mouse pointer coordinates and buttons + o) dev_fb block fill and copy + o) dev_fb draw characters (from the built-in font)? + o) dev_fb input device? mouse pointer coordinates and buttons (allow changes in these to cause interrupts as well?) - + Redefine the halt() function so that it stops "sometimes - soon", i.e. usage in demo code should be: + o) Redefine the halt() function so that it stops "sometimes + soon", i.e. usage in demo code should be: for (;;) { halt(); } @@ -308,7 +366,12 @@ securely". x) Try NetBSD/arc 4.x! (It seems to work with disk images!) x) NetBSD/pmax 4 install instructions: xterm instead of vt100! - x) DEVICE_TICK in technical.html + x) BETTER DEVICE EXAMPLES! + o) Move away from technical.html to somewhere new. + o) DEVICE_TICK + o) Implement example devices using interrupts, dyntrans + memory access, etc.? + x) Document the dyntrans core? x) Rewrite the section about experimental devices, after the framebuffer acceleration has been implemented, and demos written. (Symbolic names instead of numbers; example @@ -362,44 +425,11 @@ x) Cobalt TOD is incorrect! x) Go through all other machines, one by one, and fix them. -Busses: - o) Redesign the entire "mainbus" concept! - x) Busses should be placed in a hierarchical tree (?) - x) Specific clock/bus speeds, cpu speeds etc. - o) Interrupt routing subsystem: - x) IF POSSIBLE, try to make the new system work with the - current system, but print annoying warning messages. :) - Think carefully about this. - x) Registry for all available interrupts. - +) Each interrupt controller (including CPU cores - that can handle interrupts) should register its - interrupts, e.g. - cpu[0].irq[3] - cpu[0].irq[3].pcmcia_slot[1] - cpu[0].irq.pci[3] - +) Note: MIPS cpus have multiple irqs in the core, - while some other CPUs only have one (irq[0] - or just irq). - x) Users should use interrupt _names_ instead of integers - when attaching to an interrupt controller, but when - asserting/deasserting irq lines, small integers must - still be used (for obvious performance reasons). - Figure out a way to do this nicely! - x) Any users need to say whether they need the interrupt line - exclusively or allow shared access. - x) Must work with everything from native IRQs to - TurboChannel/PCI/ISA/ADB/PCMCIA/... - x) Must work with SMP emulation! - x) Make it with device_add(). How does the end user find - out the name of an interrupt controller/line in e.g. - a configuration file? - o) Synchronization over network? or at least in dyntrans within - one emulated machine - o) Convert to real busses: TurboChannel, PCMCIA, ADB - Config file parser: o) Rewrite it from scratch! o) Usage of any expression available through the debugger + o) Allow interrupt controllers to be added! and interrupts + to be used in more ways than before o) Support for running debugger commands (like the -c command line option) @@ -417,6 +447,7 @@ x) generic sound framework x) add one or more sound cards as devices; add a testmachine sound card first? + x) Dreamcast sound? Generic PCI sound cards? ASC SCSI controller: x) NetBSD/arc 2.0 uses the ASC controller in a way which GXemul @@ -442,9 +473,11 @@ possible. File/disk/symbol handling: + o) Make sure that disks can be added/removed during runtime! + (Perhaps this needs a reasonably large re-write.) o) Remove some of the complexity in file format guessing, for Ultrix kernels that are actually disk images? - o) Better handling of tape files + o) Better handling of tape files o) Read function argument count and types from binaries? (ELF?) o) Better demangling of C++ names. Note: GNU's C++ differs from e.g. Microsoft's C++, so multiple schemes must be possible. See @@ -453,16 +486,6 @@ Userland ABI emulation: o) see src/useremul.c -Terminal/console: - o) allow emulated serial ports to be connected to the outside - world in a more generic way, or even to other emulated - machines(?) - -Save state of the whole emulated machine, to be able to load it back - in later? (Memory, all device's states, all registers and - so on. Like taking a snapshot. (SimOS seems to do this, - according to its website.)) - Better framebuffer and X-windows functionality: o) Generalize the update_x1y1x2y2 stuff to an extend-region() function...