Skip to content

Commit

Permalink
Merge branch 'master' of github.com:evanbowman/blind-jump-portable
Browse files Browse the repository at this point in the history
  • Loading branch information
evanbowman committed Dec 17, 2020
2 parents baa5eb4 + d0278b8 commit 01fb205
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
26 changes: 26 additions & 0 deletions source/platform/gba/bios_math.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/*
libgba bios division routines
Copyright 2003-2004 by Dave Murphy.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
Please report all bugs and problems through the bug tracker at
"http://sourceforge.net/tracker/?group_id=114505&atid=668551".
*/
.text
.code 16

Expand Down
27 changes: 27 additions & 0 deletions source/platform/gba/interrupt_dispatch.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
/*
libgba interrupt dispatcher routines
Copyright 2003-2007 by Dave Murphy.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
Please report all bugs and problems through the bug tracker at
"http://sourceforge.net/tracker/?group_id=114505&atid=668551".
*/

.section .iwram,"ax",%progbits
.extern IntrTable
.code 32
Expand Down
21 changes: 21 additions & 0 deletions source/platform/gba/memcpy.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
Copyright 2005-2009 J Vijn
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

@ === void memcpy32(void *dst, const void *src, uint wdcount) IWRAM_CODE; =============
@ r0, r1: dst, src
@ r2: wdcount, then wdcount>>3
Expand Down
40 changes: 40 additions & 0 deletions source/platform/gba/reset.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
/*
libgba bios reset routines
Copyright 2003-2004 by Dave Murphy.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
Please report all bugs and problems through the bug tracker at
"http://sourceforge.net/tracker/?group_id=114505&atid=668551".
*/
.text
.code 16

.global RegisterRamReset
.thumb_func
RegisterRamReset:
swi 1
bx lr

.global SoftReset
.thumb_func
SoftReset:
ldr r3, =0x03007FFA @ restart flag
strb r0,[r3, #0]
ldr r3, =0x04000208 @ REG_IME
mov r2, #0
strb r2, [r3, #0]
ldr r1, =0x03007f00
mov sp, r1
swi 1
swi 0

.pool
.text
.code 16

Expand Down

0 comments on commit 01fb205

Please sign in to comment.