1 |
$Id: TODO,v 1.464 2007/03/16 14:13:59 debug Exp $ |
$Id: TODO,v 1.476 2007/04/14 05:39:47 debug Exp $ |
2 |
|
|
3 |
------------------------------------------------------------------------------- |
Some things, in totally random order, that I'd like to fix: |
4 |
|
(Some items in this list are probably out-to-date by now.) |
|
Landisk SH4: |
|
|
HITTA OCH FIXA SH4-STABILITETSPROBLEMEN! |
|
|
SH4 RTC, läs värdmaskinens klocka. |
|
|
När NetBSD 4.0 och OpenBSD 4.1 kommit ut, uppdatera |
|
|
installationsinstruktionerna i dokumentationen, flytta upp till |
|
|
supportat OS (guestos & index). |
|
|
Lägg till landisk i emulated machines i intro.html. |
|
|
Sätt machine_landisk stable = 1, om/när allt funkar. |
|
|
|
|
|
Add a special function to the testmachine devices, console perhaps? |
|
|
which prints a zero-terminated string like "[[ %s ]]\n" when given |
|
|
a virtual memory address (or a physical? or perhaps both should be possible). |
|
|
o) NOT to the console, but to the emulator's controlling terminal. |
|
|
DEBUG output, not console output! |
|
|
o) Very useful for debugging. DOCUMENT it! |
|
|
|
|
|
Fix the PowerPC DECR interrupt speed! (MacPPC and PReP speed, etc.) |
|
|
|
|
|
Prova att installera GNU Linux/DECstation _UTAN_ |
|
|
slow_serial_interrupts_hack_for_linux! Det kanske funkar med |
|
|
nya interruptsystemet? |
|
|
|
|
|
------------------------------------------------------------------------------- |
|
|
|
|
|
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. |
|
|
Either multiple dev_mp (one per cpu), or the single dev_mp must |
|
|
_really_ keep all per-cpu values separate. |
|
|
|
|
|
x) Alpha and SPARC emulation: |
|
|
These are the next two CPU/machine families that I want to emulate. |
|
|
|
|
|
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 :-). |
|
|
Documentation updates (!) are very important, making it easier to |
|
|
use the (already existing) network emulation features. |
|
|
|
|
|
x) PCI: |
|
|
Pretty much everything related to runtime configuration, device |
|
|
slots, interrupts, whatever. The current code is very hardcoded |
|
|
and ugly. |
|
|
o) Allow cards to be added/removed during runtime more easily. |
|
|
o) Allow cards to be enabled/disabled (i/o ports, etc, like |
|
|
NetBSD needs for disk controller detection). |
|
|
o) Allow devices to be moved in memory during runtime. |
|
|
o) Interrupts per PCI slot, etc. (A-D). |
|
|
o) PCI interrupt controller logic... very hard to get right, |
|
|
because these differ a lot from one machine to the next. |
|
|
|
|
|
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. |
|
|
|
|
|
x) Variable-length ISA support: |
|
|
The support for emulation of variable length ISAs (such as |
|
|
M68K, AMD64/i386, or AVR32) is not really there yet. It would |
|
|
be very fun to work on this, to get it right. |
|
|
|
|
|
x) Native code generation backends. |
|
|
Not necessary to have the emulator working, but speed is |
|
|
always nice to have. |
|
|
|
|
|
x) Remove all "addr mult" device support! |
|
|
Long term goal. Replace the current hacks with address |
|
|
multiplication _per device_ with layered devices, so that the |
|
|
end device (wdc, ns16550, whatever) only supports one access |
|
|
style, and the layers in between convert to 16/32/64-bit |
|
|
word alignment. |
|
|
|
|
|
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.) |
|
5 |
|
|
6 |
Dyntrans: |
Dyntrans: |
7 |
x) Instruction combination collisions? How to avoid easily... |
x) Instruction combination collisions? How to avoid easily... |
37 |
(containing code) |
(containing code) |
38 |
x) 16-bit encodings? (MIPS16, ARM Thumb, 32-bit SH on SH64) |
x) 16-bit encodings? (MIPS16, ARM Thumb, 32-bit SH on SH64) |
39 |
x) Lots of other stuff: see src/cpus/README_DYNTRANS |
x) Lots of other stuff: see src/cpus/README_DYNTRANS |
40 |
x) true recompilation backend? think carefully about this. |
x) Native code generation backends: |
41 |
o) abstract syntax for emitting opcopdes |
o) think carefully about this. |
42 |
|
o) simple syntax for emitting opcodes; backend implementation |
43 |
|
must be optional, so I don't have to write more code |
44 |
|
than necessary. after all, the non-native (C) code should |
45 |
|
always work. |
46 |
o) convert into native code only after an entire |
o) convert into native code only after an entire |
47 |
block has been translated? probably best. |
block has been translated? probably best. |
48 |
|
o) the "almost native" opcodes may be rearranged, |
49 |
|
"peep-hole optimized", etc. and then as a separate step |
50 |
|
this list of almost native opcodes is written out |
51 |
|
as native code. |
52 |
|
o) think about delay slots at the end of a block! |
53 |
o) x86/amd64 code generator can be very similar... perhaps |
o) x86/amd64 code generator can be very similar... perhaps |
54 |
|
o) NOTE that generation is per _ABI_, not per host arch! |
55 |
|
the configure script must detect ABI!!! |
56 |
o) branches to already translated code blocks can |
o) branches to already translated code blocks can |
57 |
link the blocks together |
link the blocks together |
58 |
o) load/store are the most important. |
o) load/store are the most important to optimize |
59 |
|
|
60 |
Simple Valgrind-like checks? |
Simple Valgrind-like checks? |
61 |
o) Mark every address with bits which tell whether or not the address |
o) Mark every address with bits which tell whether or not the address |
115 |
|
|
116 |
SuperH: |
SuperH: |
117 |
x) SH4 interrupt controller: |
x) SH4 interrupt controller: |
118 |
x) Implement correct priorities of interrupts |
x) MASKING should be possible! |
119 |
x) SH4 DMA (0xffa00000) |
x) SH4 DMA (0xffa00000) |
120 |
x) SH4 UBC (0xff200000) |
x) SH4 UBC (0xff200000) |
121 |
|
x) SH4 timers are going too fast! |
122 |
x) Store queues can copy 32 bytes at a time, there's no need to |
x) Store queues can copy 32 bytes at a time, there's no need to |
123 |
copy individual 32-bit words. (Performance improvement.) |
copy individual 32-bit words. (Performance improvement.) |
124 |
x) SH4 BSC (Bus State Controller) |
x) SH4 BSC (Bus State Controller) |
|
x) SH4 RTC: Read the host's clock. |
|
125 |
x) Instruction tracing should include symbols for branch targets, |
x) Instruction tracing should include symbols for branch targets, |
126 |
and so on, to make the output more human readable. |
and so on, to make the output more human readable. |
127 |
x) NetBSD/evbsh3, dreamcast, mmeye, hpcsh! Linux? |
x) SH3-specific devices: Pretty much everything! |
128 |
|
x) NetBSD/evbsh3, mmeye, hpcsh! Linux? |
129 |
x) Replace pc-relative loads with immediate load, if within the |
x) Replace pc-relative loads with immediate load, if within the |
130 |
same page. (Similar to the same optimization for ARM.) |
same page. (Similar to the same optimization for ARM.) |
131 |
x) Floating point speed! |
x) Floating point speed! |
132 |
x) Floating point exception correctness. |
x) Floating point exception correctness. |
133 |
x) Think carefully about how to implement SH5/SH64 (for evbsh5). |
x) Think carefully about how to implement SH5/SH64 (for evbsh5). |
134 |
|
|
135 |
|
Landisk SH4: |
136 |
|
x) When NetBSD/landisk 4.0 and OpenBSD/landisk 4.1 have been |
137 |
|
released, test to see if they work. (If so, update documentation, |
138 |
|
guestos + index, and set stable=1 in machine_landisk.c.) |
139 |
|
|
140 |
Dreamcast: |
Dreamcast: |
141 |
x) G2 DMA |
x) G2 DMA |
142 |
x) LAN adapter (dev_mb8696x.c). NetBSD root-on-nfs. |
x) LAN adapter (dev_mb8696x.c). NetBSD root-on-nfs. |
143 |
x) PVR: Lots of stuff. See dev_pvr.c. |
x) PVR: Lots of stuff. See dev_pvr.c. |
144 |
x) GDROM |
x) Better GDROM support |
145 |
x) Modem |
x) Modem |
146 |
x) PCI bridge/bus? |
x) PCI bridge/bus? |
147 |
x) Maple bus: |
x) Maple bus: |
151 |
x) GD-ROM emulation: Use the GDROM device. |
x) GD-ROM emulation: Use the GDROM device. |
152 |
x) Use the VGA font as a fake ROM font. (Better than |
x) Use the VGA font as a fake ROM font. (Better than |
153 |
nothing.) |
nothing.) |
|
x) Linux/dreamcast? (The gentoo kernel currently crashes.) |
|
154 |
x) Make as many as possible of the KOS examples run! |
x) Make as many as possible of the KOS examples run! |
155 |
x) More homebrew demos/games. |
x) More homebrew demos/games. |
156 |
x) SPU: Sound emulation (ARM cpu). |
x) SPU: Sound emulation (ARM cpu). |
159 |
http://www.maushammer.com/vmu.html for a good description of |
http://www.maushammer.com/vmu.html for a good description of |
160 |
the differences between LC86104C and the one used in the VME. |
the differences between LC86104C and the one used in the VME. |
161 |
|
|
|
Transputer: |
|
|
x) Implement support for Helios binaries. |
|
|
x) Stack and register contents at startup? |
|
|
x) Figure out how to boot an entire Helios distribution. |
|
|
x) Implement all instructions. :) |
|
|
|
|
|
RCA1802/RCA1805, CHIP8: |
|
|
x) CHIP8 -> RCA180x conversion |
|
|
x) Think about how to do dual-mode, variable-instr-length |
|
|
ISAs, and switch between modes. |
|
|
x) 1805 "extended" opcode -> trigger CHIP8 emulation? |
|
|
That is, all calls 0NNN could point to 0x68 opcodes, |
|
|
which, if running on a 1802 in CHIP8-emulation-mode, |
|
|
would be manually interpreted. |
|
|
x) Better solution: |
|
|
CHIP8 calls to 00xx => handle at high level, |
|
|
calls to 0xxx in general = call 180X machine code |
|
|
(0000 = reboot?) |
|
|
x) 1802 info: http://www.nyx.net/~lturner/public_html/Cosmac.html |
|
|
and: http://www.elf-emulation.com/1802.html |
|
|
x) 1805 extended opcodes: Implement at least disassembly support! |
|
|
x) Keyboard input. |
|
|
x) Sound (beep only). |
|
|
x) Slow-down to correct speed? Wikipedia: "it was usually operated |
|
|
at 3.58 MHz/2 to suit the requirements of the 1861 chip which |
|
|
gave a speed of a little over 100,000 instructions per second" |
|
|
(Note that _CHIP8_ emulation would then be even slower.) |
|
|
x) SCHIP48 (Super) emulation: |
|
|
Some more opcodes, 128x64 framebuffer, larger |
|
|
sprites and fonts. |
|
|
|
|
162 |
Alpha: |
Alpha: |
163 |
x) OSF1 PALcode, Virtual memory support. |
x) OSF1 PALcode, Virtual memory support. |
164 |
x) PALcode replacement! PAL1E etc opcodes...? |
x) PALcode replacement! PAL1E etc opcodes...? |
168 |
x) More Alpha machine types, so it could work with |
x) More Alpha machine types, so it could work with |
169 |
OpenBSD, FreeBSD, and Linux too? |
OpenBSD, FreeBSD, and Linux too? |
170 |
|
|
171 |
SPARC: |
SPARC (both the ISA and the machines): |
172 |
o) Implement Adress space identifiers; load/stores etc. |
o) Implement Adress space identifiers; load/stores etc. |
173 |
|
o) Exception/trap/interrupt handling. |
174 |
o) Save/restore register windows etc! Both v9 and pre-v9! |
o) Save/restore register windows etc! Both v9 and pre-v9! |
175 |
o) Finish the subcc and addcc flag computation code. |
o) Finish the subcc and addcc flag computation code. |
176 |
o) Add more registers (floating point, control regs etc) |
o) Add more registers (floating point, control regs etc) |
|
o) Exception/trap handling. |
|
177 |
o) Disassemly of some more instructions? |
o) Disassemly of some more instructions? |
178 |
o) Are sll etc 32-bit sign-extending or zero-extending? |
o) Are sll etc 32-bit sign-extending or zero-extending? |
179 |
o) Finish the GDB register stuff. |
o) Floating point exception correctness. |
|
x) Floating point exception correctness. |
|
180 |
o) SPARC v8, v7 etc? |
o) SPARC v8, v7 etc? |
181 |
|
o) More machine modes and devices. |
182 |
|
|
183 |
Debugger: |
Debugger: |
184 |
o) How does SMP debugging work? Does it simply use "threads"? |
o) How does SMP debugging work? Does it simply use "threads"? |
223 |
x) Alignment exceptions. |
x) Alignment exceptions. |
224 |
|
|
225 |
PReP: |
PReP: |
226 |
Clock time! ("Bad battery blah blah") |
x) Clock time! ("Bad battery blah blah") |
227 |
|
|
228 |
Algor: |
Algor: |
229 |
o) Other models than the P5064? |
o) Other models than the P5064? |
275 |
possibly other live-CD formats.) |
possibly other live-CD formats.) |
276 |
|
|
277 |
Networking: |
Networking: |
278 |
|
x) Redesign of the networking subsystem, at least the NAT translation |
279 |
|
part. The current way of allowing raw ethernet frames to be |
280 |
|
transfered to/from the emulator via UDP should probably be |
281 |
|
extended to allow the frames to be transmitted other ways as |
282 |
|
well. |
283 |
|
x) Also adding support for connecting ttys (either to xterms, or to |
284 |
|
pipes/sockets etc, or even to PPP->NAT or SLIP->NAT :-). |
285 |
|
x) Documentation updates (!) are very important, making it easier to |
286 |
|
use the (already existing) network emulation features. |
287 |
x) Fix performance problems caused by only allowing a |
x) Fix performance problems caused by only allowing a |
288 |
single TCP packet to be unacked. |
single TCP packet to be unacked. |
289 |
x) Don't hardcode offsets into packets! |
x) Don't hardcode offsets into packets! |
371 |
x) refactor various clocks/nvram/cmos into one device? |
x) refactor various clocks/nvram/cmos into one device? |
372 |
|
|
373 |
PCI: |
PCI: |
374 |
|
x) Pretty much everything related to runtime configuration, device |
375 |
|
slots, interrupts, etc must be redesigned/cleaned up. The current |
376 |
|
code is very hardcoded and ugly. |
377 |
|
o) Allow cards to be added/removed during runtime more easily. |
378 |
|
o) Allow cards to be enabled/disabled (i/o ports, etc, like |
379 |
|
NetBSD needs for disk controller detection). |
380 |
|
o) Allow devices to be moved in memory during runtime. |
381 |
|
o) Interrupts per PCI slot, etc. (A-D). |
382 |
|
o) PCI interrupt controller logic... very hard to get right, |
383 |
|
because these differ a lot from one machine to the next. |
384 |
x) last write was ffffffff ==> fix this, it should be used |
x) last write was ffffffff ==> fix this, it should be used |
385 |
together with a mask to get the correct bits. also, not ALL |
together with a mask to get the correct bits. also, not ALL |
386 |
bits are size bits! (lowest 4 vs lowest 2?) |
bits are size bits! (lowest 4 vs lowest 2?) |
388 |
x) generalize the interrupt routing stuff (lines etc) |
x) generalize the interrupt routing stuff (lines etc) |
389 |
|
|
390 |
Clocks and timers: |
Clocks and timers: |
391 |
|
x) Fix the PowerPC DECR interrupt speed! (MacPPC and PReP speed, etc.) |
392 |
x) DON'T HARDCODE 100 HZ IN cpu_mips_coproc.c! |
x) DON'T HARDCODE 100 HZ IN cpu_mips_coproc.c! |
393 |
x) Test the 8253? Right now it doesn't seem to be used? |
x) Test the 8253? Right now it doesn't seem to be used? |
394 |
x) NetWinder timeofday is incorrect! |
x) NetWinder timeofday is incorrect! |
410 |
o) non-IEEE modes (i.e. x86)? |
o) non-IEEE modes (i.e. x86)? |
411 |
|
|
412 |
Userland emulation: |
Userland emulation: |
413 |
x) Lots of stuff; freebsd and netbsd (and linux?) syscalls. |
x) Dynamic linking! |
414 |
x) Dynamic linking? Hm. |
x) Lots of stuff; freebsd, netbsd, linux, ... syscalls. |
415 |
|
x) Initial register/stack contents (environment, command line args). |
416 |
|
x) Return value (from main). |
417 |
|
x) mmap emulation layer |
418 |
|
x) errno emulation layer |
419 |
|
x) struct conversions for may syscalls |
420 |
|
|
421 |
Sound: |
Sound: |
422 |
x) generic sound framework |
x) generic sound framework |