picodrive/cpu/drc/cmn.c
notaz cff531af94 clarify PicoDrive's license
- PicoDrive was originally released by fDave with simple
  "free for non-commercial use / For commercial use, separate licencing
  terms must be obtained" license and I kept it in my releases.
- in 2011, fDave re-released his code (same that I used as base
  many years ago) dual licensed with GPLv2 and MAME licenses:
    https://code.google.com/p/cyclone68000/

Based on the above I now proclaim that the whole source code is licensed
under the MAME license as more elaborate form of "for non-commercial use".
If that raises any doubt, I announce that all my modifications (which
is the vast majority of code by now) is licensed under the MAME license,
as it reads in COPYING file in this commit.

This does not affect ym2612.c/sn76496.c that were MAME licensed already
from the beginning.
2013-06-26 03:07:07 +03:00

36 lines
673 B
C

/*
* PicoDrive
* Copyright (C) 2009,2010 notaz
*
* This work is licensed under the terms of MAME license.
* See COPYING file in the top-level directory.
*/
#include <stdio.h>
#ifdef __linux__
#include <sys/mman.h>
#endif
#include "cmn.h"
u8 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE];
void drc_cmn_init(void)
{
#ifdef __linux__
void *tmp;
tmp = mmap(tcache, DRC_TCACHE_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
printf("mmap tcache: %p, asked %p\n", tmp, tcache);
#endif
}
void drc_cmn_cleanup(void)
{
#ifdef __linux__
int ret;
ret = munmap(tcache, DRC_TCACHE_SIZE);
printf("munmap tcache: %i\n", ret);
#endif
}