~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/c64/reu.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2006-07-30 19:15:59 UTC
  • mto: (9.1.1 lenny) (1.1.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20060730191559-g31ymd2mk102kzff
Tags: upstream-1.19
ImportĀ upstreamĀ versionĀ 1.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#include "resources.h"
49
49
#include "reu.h"
50
50
#include "snapshot.h"
 
51
#ifdef HAS_TRANSLATION
 
52
#include "translate.h"
 
53
#endif
51
54
#include "types.h"
52
55
#include "util.h"
53
56
 
223
226
 
224
227
/* ------------------------------------------------------------------------- */
225
228
 
226
 
static const cmdline_option_t cmdline_options[] =
227
 
{
228
 
    { "-reu", SET_RESOURCE, 0, NULL, NULL, "REU", (resource_value_t)1,
229
 
      NULL, "Enable the RAM expansion unit" },
230
 
    { "+reu", SET_RESOURCE, 0, NULL, NULL, "REU", (resource_value_t)0,
231
 
      NULL, "Disable the RAM expansion unit" },
232
 
    { "-reuimage", SET_RESOURCE, 1, NULL, NULL, "REUfilename", NULL,
233
 
      "<name>", "Specify name of REU image" },
234
 
    { "-reusize", SET_RESOURCE, 1, NULL, NULL, "REUsize", NULL,
235
 
      "<size in KB>", "Size of the RAM expansion unit" },
236
 
    { NULL }
237
 
};
 
229
#ifdef HAS_TRANSLATION
 
230
static const cmdline_option_t cmdline_options[] =
 
231
{
 
232
    { "-reu", SET_RESOURCE, 0, NULL, NULL, "REU", (resource_value_t)1,
 
233
      0, IDCLS_ENABLE_REU },
 
234
    { "+reu", SET_RESOURCE, 0, NULL, NULL, "REU", (resource_value_t)0,
 
235
      0, IDCLS_DISABLE_REU },
 
236
    { "-reuimage", SET_RESOURCE, 1, NULL, NULL, "REUfilename", NULL,
 
237
      IDCLS_P_NAME, IDCLS_SPECIFY_REU_NAME },
 
238
    { "-reusize", SET_RESOURCE, 1, NULL, NULL, "REUsize", NULL,
 
239
      IDCLS_P_SIZE_IN_KB, IDCLS_REU_SIZE },
 
240
    { NULL }
 
241
};
 
242
#else
 
243
static const cmdline_option_t cmdline_options[] =
 
244
{
 
245
    { "-reu", SET_RESOURCE, 0, NULL, NULL, "REU", (resource_value_t)1,
 
246
      NULL, N_("Enable the RAM expansion unit") },
 
247
    { "+reu", SET_RESOURCE, 0, NULL, NULL, "REU", (resource_value_t)0,
 
248
      NULL, N_("Disable the RAM expansion unit") },
 
249
    { "-reuimage", SET_RESOURCE, 1, NULL, NULL, "REUfilename", NULL,
 
250
      N_("<name>"), N_("Specify name of REU image") },
 
251
    { "-reusize", SET_RESOURCE, 1, NULL, NULL, "REUsize", NULL,
 
252
      N_("<size in KB>"), N_("Size of the RAM expansion unit") },
 
253
    { NULL }
 
254
};
 
255
#endif
238
256
 
239
257
int reu_cmdline_options_init(void)
240
258
{
263
281
    reu_blocklen_low_shadow = 0;
264
282
 
265
283
    if (reu_size >= (256 << 10))
266
 
        reu[REU_REG_R_STATUS] = 0x50;
 
284
        reu[REU_REG_R_STATUS] = 0x10;
267
285
    else
268
 
        reu[REU_REG_R_STATUS] = 0x40;
269
 
 
270
 
    reu[REU_REG_W_COMMAND] = 0x4A;
 
286
        reu[REU_REG_R_STATUS] = 0x00;
 
287
 
 
288
    reu[REU_REG_W_COMMAND] = 0x10;
 
289
 
 
290
    reu[REU_REG_RW_BLOCKLEN_LOW]  = 0xFF;
 
291
    reu[REU_REG_RW_BLOCKLEN_HIGH] = 0xFF;
271
292
}
272
293
 
273
294
static int reu_activate(void)