<html>
<body>
<div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt><a href="#file1">mem.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+28</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">f405d42a9786 -> 2cc6c50d0dd2</td></tr>
</table>
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Add default read/write burst methods for IO regions. (There's almost
certainly a bug somewhere if these are actually invoked, but try to do the
right thing anyway rather than crashing)
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>mem.c</b></big> <small id="info" style="color: #888888;" >f405d42a9786 -> 2cc6c50d0dd2</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/mem.c
+++ lxdream/src/mem.c
@@ -83,6 +83,30 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /* No effect */
}
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void FASTCALL default_write_burst( sh4addr_t addr, unsigned char *src )
+{
+ mem_write_fn_t writefn = ext_address_space[(addr&0x1FFFFFFF)>>12]->write_long;
+ uint32_t *p = (uint32_t *)src;
+ sh4addr_t end = addr + 32;
+ while( addr < end ) {
+ writefn(addr, *p);
+ addr += 4;
+ p += 4;
+ }
+}
+
+void FASTCALL default_read_burst( unsigned char *dest, sh4addr_t addr )
+{
+ mem_read_fn_t readfn = ext_address_space[(addr&0x1FFFFFFF)>>12]->read_long;
+ uint32_t *p = (uint32_t *)dest;
+ sh4addr_t end = addr + 32;
+ while( addr < end ) {
+ *p = readfn(addr);
+ addr += 4;
+ p += 4;
+ }
+}
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > struct mem_region_fn mem_region_unmapped = {
unmapped_read_long, unmapped_write_long,
unmapped_read_long, unmapped_write_long,
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -400,6 +424,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > io->save_mem = io->mem + LXDREAM_PAGE_SIZE;
io->index = (struct mmio_port **)malloc(1024*sizeof(struct mmio_port *));
io->trace_flag = 0;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ if( io->fn.write_burst == NULL )
+ io->fn.write_burst = default_write_burst;
+ if( io->fn.read_burst == NULL )
+ io->fn.read_burst = default_read_burst;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > memset( io->index, 0, 1024*sizeof(struct mmio_port *) );
for( i=0; io->ports[i].id != NULL; i++ ) {
io->ports[i].val = (uint32_t *)(io->mem + io->ports[i].offset);
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>