1 |
$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 $ |
2 |
|
|
3 |
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. |
|
4 |
|
|
5 |
|
Fix after the 0.4.4 release: |
6 |
|
Fix the PowerPC DECR interrupt speed! |
7 |
|
|
8 |
|
------------------------------------------------------------------------------- |
9 |
|
|
10 |
|
Possible (relatively large) work packages to concentrate on in the future: |
11 |
|
|
12 |
|
x) SMP: |
13 |
|
Get SMP working again. It is pretty much broken since I started |
14 |
|
the conversion from the old bintrans system to the new dyntrans system. |
15 |
|
Add better Test machine demos for SMP in the demos directory. |
16 |
|
|
17 |
|
x) Network: |
18 |
|
Redesign of the networking subsystem, at least the NAT translation |
19 |
|
part. The current way of allowing raw ethernet frames to be |
20 |
|
transfered to/from the emulator via UDP should probably be extended |
21 |
|
to allow the frames to be transmitted other ways as well. |
22 |
|
Also adding support for connecting ttys (either to xterms, or to |
23 |
|
pipes/sockets etc, or even to PPP->NAT or SLIP->NAT :-). |
24 |
|
|
25 |
|
x) PCI: |
26 |
|
Pretty much everything related to runtime configuration, device |
27 |
|
slots, interrupts, whatever. The current code is very hardcoded |
28 |
|
and ugly. |
29 |
|
|
30 |
|
x) Debugging: |
31 |
|
Think more about SMP debugging, etc. Right now, the |
32 |
|
debugger is a mess. Also, a better connection to GDB would be |
33 |
|
very nice to have. |
34 |
|
|
35 |
|
x) Userland emulation: |
36 |
|
Primary goals would be NetBSD and Linux syscall emulation. |
37 |
|
|
38 |
|
And of course, there are _LOTS_ of minor TODOs spread out throughout |
39 |
|
the source code, which must be fixed sooner or later. |
40 |
|
|
41 |
|
------------------------------------------------------------------------------- |
42 |
|
|
43 |
|
Some other things, in random order, that I'd like to fix: (Some items in |
44 |
|
this list are probably out-to-date by now.) |
45 |
|
|
46 |
Dyntrans: |
Dyntrans: |
47 |
x) Instruction combination collisions? How to avoid easily... |
x) Instruction combination collisions? How to avoid easily... |
75 |
(containing code) |
(containing code) |
76 |
x) 16-bit encodings? (MIPS16, ARM Thumb, 32-bit SH on SH64) |
x) 16-bit encodings? (MIPS16, ARM Thumb, 32-bit SH on SH64) |
77 |
x) Lots of other stuff: see src/cpus/README_DYNTRANS |
x) Lots of other stuff: see src/cpus/README_DYNTRANS |
78 |
x) true recompilation backend? think carefully about this, |
x) true recompilation backend? think carefully about this. |
79 |
experiment in a separate project (not in GXemul) |
o) abstract syntax for emitting opcopdes |
80 |
o) First test would be to just implement a simple |
o) convert into native code only after an entire |
81 |
instruction such as MIPS' addiu or lui, on AMD64 |
block has been translated? probably best. |
82 |
hosts... |
o) x86/amd64 code generator can be very similar... perhaps |
83 |
|
o) branches to already translated code blocks can |
84 |
|
link the blocks together |
85 |
|
o) load/store are the most important. |
86 |
|
|
87 |
Simple Valgrind-like checks? |
Simple Valgrind-like checks? |
88 |
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 |
128 |
x) watchhi/watchlo exceptions, and other exception |
x) watchhi/watchlo exceptions, and other exception |
129 |
handling details |
handling details |
130 |
o) R10000 and others: (R12000, R14000 ?) |
o) R10000 and others: (R12000, R14000 ?) |
131 |
|
x) The code before the line |
132 |
|
/* reg[COP0_PAGEMASK] = cpu->cd.mips.coproc[0]->tlbs[0].mask & PAGEMASK_MASK; */ |
133 |
|
in cpu_mips.c is not correct for R10000 according to |
134 |
|
Lemote's Godson patches for GXemul. TODO: Go through all |
135 |
|
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 |
136 |
|
and make sure everything works with R10000. |
137 |
|
Then test with OpenBSD/sgi? |
138 |
x) memory space, exceptions, ... |
x) memory space, exceptions, ... |
139 |
x) use cop0 framemask for tlb lookups |
x) use cop0 framemask for tlb lookups |
140 |
(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) |
(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) |
141 |
|
|
142 |
SuperH: |
SuperH: |
|
x) DMA (0xffa00000) |
|
|
x) Instruction tracing should include symbols for branch targets, |
|
|
and so on... |
|
143 |
x) SH4 interrupt controller: |
x) SH4 interrupt controller: |
144 |
x) Implement correct priorities of interrupts |
x) Implement correct priorities of interrupts |
145 |
|
x) SH4 DMA (0xffa00000) |
146 |
|
x) SH4 UBC (0xff200000) |
147 |
|
x) Store queues can copy 32 bytes at a time, there's no need to |
148 |
|
copy individual 32-bit words. (Performance improvement.) |
149 |
x) SH4 BSC (Bus State Controller) |
x) SH4 BSC (Bus State Controller) |
150 |
|
x) SH4 RTC: Read the host's clock. |
151 |
|
x) SH4 SCIF: Serial _interrupts_ |
152 |
|
x) Instruction tracing should include symbols for branch targets, |
153 |
|
and so on, to make the output more human readable. |
154 |
x) NetBSD/evbsh3, dreamcast, mmeye, hpcsh! Linux? |
x) NetBSD/evbsh3, dreamcast, mmeye, hpcsh! Linux? |
155 |
x) Replace pc-relative loads with immediate load, if within the |
x) Replace pc-relative loads with immediate load, if within the |
156 |
same page. (Similar to the same optimization for ARM.) |
same page. (Similar to the same optimization for ARM.) |
|
x) Floating point exception correctness. |
|
157 |
x) Floating point speed! |
x) Floating point speed! |
158 |
|
x) Floating point exception correctness. |
159 |
x) Think carefully about how to implement SH5/SH64 (for evbsh5). |
x) Think carefully about how to implement SH5/SH64 (for evbsh5). |
160 |
|
|
161 |
Dreamcast: |
Dreamcast: |
162 |
x) CD image bootup: |
x) G2 DMA |
163 |
0) Find IP.BIN, and load it to 0x8c008000. |
x) LAN adapter (dev_mb8696x.c). NetBSD root-on-nfs. |
|
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. |
|
164 |
x) PVR: Lots of stuff. See dev_pvr.c. |
x) PVR: Lots of stuff. See dev_pvr.c. |
165 |
|
x) GDROM |
166 |
|
x) Modem |
167 |
|
x) PCI bridge/bus? |
168 |
x) Maple bus: |
x) Maple bus: |
169 |
x) Correct controller input |
x) Correct controller input |
170 |
x) Mouse input |
x) Mouse input |
171 |
x) PROM/BIOS calls: |
x) Software emulation of BIOS calls: |
172 |
x) GD-ROM emulation |
x) GD-ROM emulation: Use the GDROM device. |
173 |
x) NetBSD/dreamcast: Root on nfs? |
x) Use the VGA font as a fake ROM font. (Better than |
174 |
|
nothing.) |
175 |
x) Linux/dreamcast? (The gentoo kernel currently crashes.) |
x) Linux/dreamcast? (The gentoo kernel currently crashes.) |
176 |
|
x) Make as many as possible of the KOS examples run! |
177 |
x) More homebrew demos/games. |
x) More homebrew demos/games. |
178 |
x) Sound emulation (ARM cpu). |
x) SPU: Sound emulation (ARM cpu). |
179 |
x) VME processor emulation? |
x) VME processor emulation? "(Sanyo LC8670 "Potato")" according to |
180 |
|
Wikipedia, LC86K87 according to Comstedt's page. See |
181 |
|
http://www.maushammer.com/vmu.html for a good description of |
182 |
|
the differences between LC86104C and the one used in the VME. |
183 |
|
|
184 |
Transputer: |
Transputer: |
185 |
x) Implement support for Helios binaries. |
x) Implement support for Helios binaries. |
223 |
|
|
224 |
SPARC: |
SPARC: |
225 |
o) Implement Adress space identifiers; load/stores etc. |
o) Implement Adress space identifiers; load/stores etc. |
226 |
o) Save/restore register windows etc! |
o) Save/restore register windows etc! Both v9 and pre-v9! |
227 |
o) Finish the subcc and addcc flag computation code. |
o) Finish the subcc and addcc flag computation code. |
228 |
o) Add more registers (floating point, control regs etc) |
o) Add more registers (floating point, control regs etc) |
229 |
o) Exception/trap handling. |
o) Exception/trap handling. |
240 |
o) Try to make the debugger more modular and, if possible, reentrant! |
o) Try to make the debugger more modular and, if possible, reentrant! |
241 |
o) Remove the emul command? (But show network info if showing |
o) Remove the emul command? (But show network info if showing |
242 |
machines?) |
machines?) |
243 |
|
o) Evaluate expressions within []? That would allow stuff like |
244 |
|
cpu[x] where x is an expression. |
245 |
o) Settings: |
o) Settings: |
246 |
x) Special handlers for Write! |
x) Special handlers for Write! |
247 |
+) MIPS coproc regs |
+) MIPS coproc regs |
251 |
o) see src/debugger.c for more |
o) see src/debugger.c for more |
252 |
|
|
253 |
POWER/PowerPC: |
POWER/PowerPC: |
254 |
x) find and fix the bug which causes NetBSD/macppc to fail after |
x) Fix DECR timer speed, so it matches the host. |
|
an install! |
|
255 |
x) NetBSD/prep 3.x triggers a possible bug in the emulator: |
x) NetBSD/prep 3.x triggers a possible bug in the emulator: |
256 |
<wdc_exec_command(0xd005e514,0xd60cdd30,0,8,..)> |
<wdc_exec_command(0xd005e514,0xd60cdd30,0,8,..)> |
257 |
<ata_get_xfer(0,0xd60cdd30,0,8,..)> |
<ata_get_xfer(0,0xd60cdd30,0,8,..)> |
275 |
x) Floating point exception correctness. |
x) Floating point exception correctness. |
276 |
x) Alignment exceptions. |
x) Alignment exceptions. |
277 |
|
|
278 |
|
PReP: |
279 |
|
Clock time! ("Bad battery blah blah") |
280 |
|
|
281 |
Algor: |
Algor: |
282 |
o) Other models than the P5064? |
o) Other models than the P5064? |
283 |
o) PCI interrupts... needed for stuff like the tlp NIC? |
o) PCI interrupts... needed for stuff like the tlp NIC? |
284 |
|
|
285 |
|
BeBox: |
286 |
|
o) Interrupts. There seems to be a problem with WDC interrupts |
287 |
|
"after a short while", although a few interrupts get through? |
288 |
|
o) Perhaps find a copy of BeOS and try it? |
289 |
|
|
290 |
HPCmips: |
HPCmips: |
291 |
x) Mouse/pad support! :) |
x) Mouse/pad support! :) |
292 |
x) A NIC? (As a PCMCIA device?) |
x) A NIC? (As a PCMCIA device?) |
294 |
AVR: |
AVR: |
295 |
o) Everything. |
o) Everything. |
296 |
|
|
|
AVR32: |
|
|
o) Everything. It would be good if there was NetBSD/avr32 to |
|
|
experiment with... |
|
|
|
|
297 |
ARM: |
ARM: |
298 |
o) See netwinder_reset() in NetBSD; the current "an internal error |
o) See netwinder_reset() in NetBSD; the current "an internal error |
299 |
occured" message after reboot/halt is too ugly. |
occured" message after reboot/halt is too ugly. |
300 |
o) ARM "wait"-like instruction? |
o) ARM "wait"-like instruction? |
301 |
o) try to get netbsd/evbarm 3.x running (iq80321) |
o) try to get netbsd/evbarm 3.x or 4.x running (iq80321) |
302 |
o) make the xscale counter registers (ccnt) work |
o) make the xscale counter registers (ccnt) work |
303 |
o) make the ata controller usable for FreeBSD! |
o) make the ata controller usable for FreeBSD! |
304 |
o) zaurus for openbsd... |
o) Zaurus emulation, for e.g. OpenBSD/zaurus |
305 |
o) debian/cats crashes because of unimplemented coproc stuff. |
o) Debian/cats crashes because of unimplemented coproc stuff. |
306 |
fix this? |
fix this? |
307 |
|
|
308 |
Test machines: |
Test machines: |
309 |
+ dev_fb block fill and copy |
o) dev_fb block fill and copy |
310 |
+ dev_fb draw characters (from the built-in font)? |
o) dev_fb draw characters (from the built-in font)? |
311 |
+ dev_fb input device? mouse pointer coordinates and buttons |
o) dev_fb input device? mouse pointer coordinates and buttons |
312 |
(allow changes in these to cause interrupts as well?) |
(allow changes in these to cause interrupts as well?) |
313 |
+ Redefine the halt() function so that it stops "sometimes |
o) Redefine the halt() function so that it stops "sometimes |
314 |
soon", i.e. usage in demo code should be: |
soon", i.e. usage in demo code should be: |
315 |
for (;;) { |
for (;;) { |
316 |
halt(); |
halt(); |
317 |
} |
} |
366 |
securely". |
securely". |
367 |
x) Try NetBSD/arc 4.x! (It seems to work with disk images!) |
x) Try NetBSD/arc 4.x! (It seems to work with disk images!) |
368 |
x) NetBSD/pmax 4 install instructions: xterm instead of vt100! |
x) NetBSD/pmax 4 install instructions: xterm instead of vt100! |
369 |
x) DEVICE_TICK in technical.html |
x) BETTER DEVICE EXAMPLES! |
370 |
|
o) Move away from technical.html to somewhere new. |
371 |
|
o) DEVICE_TICK |
372 |
|
o) Implement example devices using interrupts, dyntrans |
373 |
|
memory access, etc.? |
374 |
|
x) Document the dyntrans core? |
375 |
x) Rewrite the section about experimental devices, after the |
x) Rewrite the section about experimental devices, after the |
376 |
framebuffer acceleration has been implemented, and demos |
framebuffer acceleration has been implemented, and demos |
377 |
written. (Symbolic names instead of numbers; example |
written. (Symbolic names instead of numbers; example |
425 |
x) Cobalt TOD is incorrect! |
x) Cobalt TOD is incorrect! |
426 |
x) Go through all other machines, one by one, and fix them. |
x) Go through all other machines, one by one, and fix them. |
427 |
|
|
|
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 |
|
|
|
|
428 |
Config file parser: |
Config file parser: |
429 |
o) Rewrite it from scratch! |
o) Rewrite it from scratch! |
430 |
o) Usage of any expression available through the debugger |
o) Usage of any expression available through the debugger |
431 |
|
o) Allow interrupt controllers to be added! and interrupts |
432 |
|
to be used in more ways than before |
433 |
o) Support for running debugger commands (like the -c |
o) Support for running debugger commands (like the -c |
434 |
command line option) |
command line option) |
435 |
|
|
447 |
x) generic sound framework |
x) generic sound framework |
448 |
x) add one or more sound cards as devices; add a testmachine |
x) add one or more sound cards as devices; add a testmachine |
449 |
sound card first? |
sound card first? |
450 |
|
x) Dreamcast sound? Generic PCI sound cards? |
451 |
|
|
452 |
ASC SCSI controller: |
ASC SCSI controller: |
453 |
x) NetBSD/arc 2.0 uses the ASC controller in a way which GXemul |
x) NetBSD/arc 2.0 uses the ASC controller in a way which GXemul |
473 |
possible. |
possible. |
474 |
|
|
475 |
File/disk/symbol handling: |
File/disk/symbol handling: |
476 |
|
o) Make sure that disks can be added/removed during runtime! |
477 |
|
(Perhaps this needs a reasonably large re-write.) |
478 |
o) Remove some of the complexity in file format guessing, for |
o) Remove some of the complexity in file format guessing, for |
479 |
Ultrix kernels that are actually disk images? |
Ultrix kernels that are actually disk images? |
480 |
o) Better handling of tape files |
o) Better handling of tape files |
481 |
o) Read function argument count and types from binaries? (ELF?) |
o) Read function argument count and types from binaries? (ELF?) |
482 |
o) Better demangling of C++ names. Note: GNU's C++ differs from e.g. |
o) Better demangling of C++ names. Note: GNU's C++ differs from e.g. |
483 |
Microsoft's C++, so multiple schemes must be possible. See |
Microsoft's C++, so multiple schemes must be possible. See |
486 |
Userland ABI emulation: |
Userland ABI emulation: |
487 |
o) see src/useremul.c |
o) see src/useremul.c |
488 |
|
|
|
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.)) |
|
|
|
|
489 |
Better framebuffer and X-windows functionality: |
Better framebuffer and X-windows functionality: |
490 |
o) Generalize the update_x1y1x2y2 stuff to an extend-region() |
o) Generalize the update_x1y1x2y2 stuff to an extend-region() |
491 |
function... |
function... |